to_iso8601_string


Description:

public string? to_iso8601_string ()

Create a minimal string compatible with ISO-8601.

Possible output formats are (for example): `2012`, `2012-06`, `2012-06-23`, `2012-06-23T23:30Z`, `2012-06-23T23:30+0100`, `2012-06-23T23:30:59Z`, `2012-06-23T23:30:59+0100`

Parameters:

this

a DateTime.

Returns:

a newly allocated string formatted according to ISO 8601 and only including the datetime fields that are valid, or null in case there was an error.