Chartbuilder icon indicating copy to clipboard operation
Chartbuilder copied to clipboard

Chartbuilder can't figure out whether a inputted date format is MM/DD/YYYY or DD/MM/YYYY

Open yanofsky opened this issue 10 years ago • 2 comments

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

yanofsky avatar Aug 04 '13 18:08 yanofsky

Should this be closed after the above merge, or is there still work needed here?

hpshelton avatar Aug 06 '13 07:08 hpshelton

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

yanofsky avatar Aug 06 '13 17:08 yanofsky