toIso8601DateString method

String toIso8601DateString()

Returns an ISO-8601 full-precision extended format representation.

The format is yyyy-MM-dd, where:

  • yyyy is a, possibly negative, four digit representation of the year, if the year is in the range -9999 to 9999, otherwise it is a signed six digit representation of the year.
  • MM is the month in the range 01 to 12,
  • dd is the day of the month in the range 01 to 31

Implementation

String toIso8601DateString() => toIso8601String().split("T").first;