Closed mmcguinn closed 11 years ago
Ok it appears that the information about the spec date above is actually inaccurate. There is no official spec.
That said, after a couple hours of frustration concerning this, I found a date/time library that looks like it will work for us perfectly! check out this quick demo http://jsfiddle.net/CsEXk/ I made - just type a timestamp into the input box and hit enter. It will show UNIX milliseconds and an ISO date format (forget which one).
Can anyone see any obvious hole's in that library's functionality?
@ivanrudnicki @fgmart @jdalphon
Okay, I've been working on testing and integrating moment.js, so here is a revision of accepted formats:
slashes, dashes and commas in the date portion are also accepted (They are actually turned into spaces). It will also accept the name of the month instead of the number, though I don't recommend relying on that as relatively trivial spelling errors and such will cause it to fail.
As a small addition to the formats discussed above, I currently can't accept three-letter designations for timezones (Can look into adding this in if it's a serious issue, currently a library limitation). The proper way to write a timezone is "+/-hhmm" for an offset of h hours and m minutes.
The vis should accept the following formats:
Two requires temporarily removing the miliseconds before running through the JS date parser, as only chrome will accept fractional seconds, otherwise this format should always work as per JS spec.