Declaration
public static string ToIsoStringRoundtrip(
this DateTime datetime,
IsoDateFormat format = IsoDateFormat.HumanReadable,
IsoDatePrecision minPrecision = IsoDatePrecision.Days
)
Summary
Returns a string representation of the date/time in an ISO-8601-like format. Use this if the result must be round-trippable
without losing any information. The function will omit higher-precision parts whose values are zeroes, as permitted by the standard.
Parameters
this DateTime | datetime | Date/time to convert. |
IsoDateFormat | format | One of the several pre-defined formats to use. |
IsoDatePrecision | minPrecision | Minimum precision of the resulting string. The actual precision is determined by what's available in the date/time, bounded by this parameter. |