问题
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?
回答1:
In the current ECMA standard for JavaScript there is no time-only type. There's just Date
.
来源:https://stackoverflow.com/questions/14540759/javascript-iso8601-3-5-2-time-of-day-24-hour-datatype-disconnected-from-calend