Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add half-year directive (%h) for formatting dates and improve descriptions to include extra date formatting options #5762

Merged
merged 7 commits into from
Jun 24, 2021

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Jun 23, 2021

Resolves #5725.

@plotly/plotly_js

@archmoj archmoj added this to the NEXT milestone Jun 23, 2021
@archmoj archmoj requested a review from alexcjohnson June 24, 2021 15:21
axisHoverFormat: axisHoverFormat,
descriptionOnlyNumbers: descriptionOnlyNumbers,
descriptionWithDates: descriptionWithDates
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea to move this into cartesian and export the descriptions separately. I know it's a bit long, but can we put "attributes" in the file name? ie axis_format_attributes.js? Otherwise you'd be tempted to think this file contains actual text formatting functions.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃 Very nice implementation. I spent a minute thinking about how this would interact with world calendars - I suspect it's going to just give the gregorian half year, but I think it's also going to give the gregorian quarter, because quarters weren't implemented for world calendars. Doubtful anyone will try to use this that way so I wouldn't do anything about it for now, just something to be aware of in case this ever comes up.

Just one naming question but otherwise this is good to go!

@archmoj archmoj changed the title Add half-year directive (%h) for formatting dates Add half-year directive (%h) for formatting dates and improve descriptions to include extra date formatting options Jun 24, 2021
@archmoj archmoj merged commit 4f54bcd into master Jun 24, 2021
@archmoj archmoj deleted the half-year-format-directive branch June 24, 2021 17:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Half-year datetime format directive
2 participants