javascript - What is simplified in ECMAScript 5 date format compared to ISO 8601 -


ecmascript defines string interchange format date-times based upon simplification of iso 8601 extended format. format follows: yyyy-mm-ddthh:mm:ss.sssz
https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15

so difference between 2 formats? have careful about? noticed iso 8601 states t can substituted space. else "simplified"?

to specific: question standard. browser behavior interesting, not main focus of question.

iso 8601 defines lots of different formats date , time, like:

  • extended (same used ecma): yyyy-mm-ddthh:mm:ss.sssz
  • basic (same above, without - , : separators): yyyymmddthhmmss.sssz

and variations: date, time , or without offset. if date uses 1 of above (basic or extended), time must use same.

and allows formats date (not used ecma):

  • "incomplete" dates:
    • only year: yyyy, or expanded version + or - signal before number
    • just year , month: yyyy-mm
    • just month , day: --mm-dd
  • week dates: yyyy-www or yyyy-www-d. www week number (an uppercase w followed 2 digits), yyyy in case iso week-numbering year - quoting wikipedia:

the iso week-numbering year starts @ first day (monday) of week 01 , ends @ sunday before new iso year (hence without overlap or gap). consists of 52 or 53 full weeks. first iso week of year may have 3 days in gregorian calendar year ending; if three, friday, saturday, , sunday. similarly, last iso week of year may have 3 days in gregorian calendar year starting; if three, monday, tuesday , wednesday. thursday of each iso week in gregorian calendar year denoted iso week-numbering year.

  • ordinal dates: yyyy-ddd (year , day of year).
    example: 2017-02-01 same 2017-032 (february 1st 32th day of year).

the week , ordinal formats above can used time.
example: 2017-02-01t10:00 , 2017-032t10:00 both valid (and equivalent).

ecma simplifies allowing yyyy-mm-ddthh:mm:ss.sssz. allows extended years (with 6 digits , signal), keeping same format other fields.


iso 8601 defines concepts (durations , time intervals). although they're both related dates , times, they're not same thing: duration "amount of time" (like "2 days, 4 hours , 5 minutes") , interval "intervening time between 2 time points" (with start , end dates).


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -