Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Separate locale from date/time format #52

Open
matt-spx opened this issue Feb 20, 2019 · 1 comment
Open

Separate locale from date/time format #52

matt-spx opened this issue Feb 20, 2019 · 1 comment
Assignees

Comments

@matt-spx
Copy link

Currently, the date and time in the calendar is formatted on the the basis of the calendar-locale property. It would be nice to be able to handle language, date format and time format using separate properties. Perhaps with date and time format falling back to locale when these properties are not set.

@sirbeagle
Copy link
Collaborator

Okay, agreed there should be a way to customize labels, but there are definitely some challenges in doing so. Most of the labels use Luxon (the underlying date class we're using) to handle formatting. It should be pretty easy to have an object that has a named label and the accompanying Luxon code we want to use. Those functions should run through the function called formatDate() so we can just add the functionality there.

The issue I see is where we are dynamically creating "smart" labels dependent on the content. So take a label for a 5 day calendar. It might be labelled December 15-19 for days in the same month, or December 30 - January 3 if it crosses a month. We'll have to have a crafty way of dealing with those situations.

@sirbeagle sirbeagle self-assigned this Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants