Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does dashes mean in ISO 8601 date and time format?

What does dashes mean in ISO 8601 date and time format?

--0412
--1022T1410
---12

Is it current year and month, some "minimum" year or anything else?

If its a current year, does this means I can not represent it in DateTimeOffset object in .Net because it will set some specific year and month when parsing '---12' string?

like image 594
IT Hit WebDAV Avatar asked Feb 03 '26 18:02

IT Hit WebDAV


1 Answers

In ISO 8601:1998 and ISO 8601:2000 they are known as truncated representations where each hyphens indicate omitted components.

--MMDD represents a specific day of the month in the implied year. Truncated representations where removed in ISO 8601:2004 because it introduced an ambiguity in truncated representations with implied century.

like image 168
chansen Avatar answered Feb 05 '26 08:02

chansen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!