Chartbuilder
Chartbuilder copied to clipboard
Chartbuilder can't figure out whether a inputted date format is MM/DD/YYYY or DD/MM/YYYY
Given a list of dates we could probably figure this out pretty easily and reliably.
It should guess that a list of XX/01/YYYY is US dates and a list of 01/XX/YYYY or (31/XX/YYYY) is a list of EU dates
The cases we could never truly guess are date range that is wholly in the first 12 days of the month, or a range with monthly periodicity (e.g. Jan 1, Feb 1, Mar 1) in the first 12 days of the month. In these cases it should fall back to the specified locale
Should this be closed after the above merge, or is there still work needed here?
Still work needed!
Right now Chartbuilder needs to be told what to expect for input date formats by setting the Sugar.js locale. We can improve on this by allowing any input of a date format, determining what it is, falling back to the locale if we cant, and outputting in the specified locale