In the current ECMA standard for JavaScript there is no time-only type. There's just Date
.
javascript ISO8601 3.5.2 Time Of Day (24-hour) datatype disconnected from calendar
-
05-03-2022 - |
Question
ISO 8601 3.5.2 distinguishes between date-time combined values and time-only values. Time-only values model the 24-hour clock of an indeterminate day not on the calendar. For Time-Only values, 24:00 is a valid value, to distinguish the end-of-the-day from the start-of-the-day (00:00).
Until explicitly attached to a day on the calendar, Time-Only values are simply a point on the segment of finite time that runs from 00:00 to 24:00.
What is the current ECMA standard with respect to Time-only values? EDIT: Is there a proposed standard that address this?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow