Scope (5)
Parse a timestamp in local time:
Parse a timestamp in ordinal date format (specifying the number of days since the start of the year):
Parse a timestamp describing a week:
Parse a list of timestamp strings:
Parse a string describing a duration of time:
Properties and Relations (2)
DateObject supports limited parsing of ISO 8601-formatted strings:
DateObject does not, however, currently support parsing ISO 8601-formatted strings that include a timezone value:
FromISOTimestamp supports parsing strings with timezone values:
FromISOTimestamp is compatible with the "ISODate", "ISOWeekDate", "ISOOrdinalDate" and "ISODateTime" format specifications of DateString:
Possible Issues (9)
By default, FromISOTimestamp parses ISO 8601-formatted strings containing an integer seconds component with "Seconds" granularity, while DateObject always parses such strings with "Instant" granularity:
Force FromISOTimestamp to use "Instant" granularity:
FromISOTimestamp parses strings containing a fractional seconds component with "Instant" granularity:
By default, FromISOTimestamp treats times with unspecified timezone as being in local ($TimeZone) time, while TimeObject represents them as explicitly lacking a timezone:
Set the option TimeZone → None on FromISOTimestamp to output explicitly timezone-less values:
By default, FromISOTimestamp parses time strings using the granularity implied by the format of the string, while TimeObject always uses "Instant" granularity:
Force FromISOTimestamp to use "Instant" granularity:
"Implied" leading components are not supported by FromISOTimestamp:
ISO 8601 treats year 1 BCE as year 0 (and year 2 BCE as year 1, etc.), so negative year values in ISO 8601 timestamps and DateObjects will differ in appearance, although they represent the same dates:
DateObject and TimeObject do not support special handling of the leap second, so timestamps including leap seconds will roll over to the next "0" second:
Certain "basic format" ISO timestamps which can be alternatively parsed as either dates or times are always parsed to dates by FromISOTimestamp:
Use “extended format” timestamps to eliminate ambiguity:
Alternatively, prefix "basic format" timestamps with the "T" character:
"Alternative format" duration strings are not supported:
Date/time intervals are not supported:
Create an Interval representing a date/time interval from a string in ISO 8601 "start/end" format by splitting at the "/" character: