Html5 time element question

What is the format for adding a millisecond to a time element? I know the main format YYYY-MM-DDThh:mm:ssTZD, but what is this millisecond, can someone give me an example?

+3
source share
1 answer

According to section 2.4.5.4 of the HTML5 specification , you can do this with a dot. after the value of seconds.

Quoting the current draft (focus):

Optional (required if the second is non-zero):

  • Symbol ":" (U + 003A)
  • Two ASCII digits representing the integer part of a second, in the range 0 ≤ s ≤ 59
  • Optional (required if the second is not an integer):
    • Character A 002E FULL STOP (.)
    • One, two, or three ASCII digits representing the fractional part of the second

For instance:

2011-02-27T12:00:00.123

In this example, 123 is milliseconds.

+3
source

Source: https://habr.com/ru/post/1795047/


All Articles