stormseed / daykeep-calendar-quasar

A full event display calendar for the Quasar framework that has multiple viewing formats.
MIT License
274 stars 70 forks source link

Separate locale from date/time format #52

Open matt-spx opened 5 years ago

matt-spx commented 5 years ago

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 commented 5 years ago

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.