html5 time element question
What is the format to add a millisecond to my time element? I know the basic format is YYYY-MM-DDThh:mm:ssTZD
but what is it for the millisecond can someone gi开发者_JS百科ve me an example?
According to section 2.4.5.4 of the HTML5 draft specification, you can do it with a dot '.' following the seconds value.
Quoting the current draft (emphasis mine):
Optionally (required if second is non-zero):
- A ":" (U+003A) character
- Two ASCII digits, representing the integer part of second, in the range 0 ≤ s ≤ 59
- Optionally (required if second is not an integer):
- A 002E FULL STOP character (.)
- One, two, or three ASCII digits, representing the fractional part of second
For example:
2011-02-27T12:00:00.123
In this example, the 123 is milliseconds.
精彩评论