DateTime.from_iso8601_string


Description:

[ CCode ( has_construct_function = false ) ]
public DateTime.from_iso8601_string (string string)

Tries to parse common variants of ISO-8601 datetime strings into a DateTime.

Possible input formats are (for example): `2012-06-30T22:46:43Z`, `2012`, `2012-06`, `2012-06-30`, `2012-06-30T22:46:43-0430`, `2012-06-30T22:46Z`, `2012-06-30T22:46-0430`, `2012-06-30 22:46`, `2012-06-30 22:46:43`, `2012-06-00`, `2012-00-00`, `2012-00-30`, `22:46:43Z`, `22:46Z`, `22:46:43-0430`, `22:46-0430`, `22:46:30`, `22:46` If no date is provided, it is assumed to be "today" in the timezone provided (if any), otherwise UTC.

Parameters:

string

ISO 8601-formatted datetime string.

Returns:

a newly created DateTime, or null on error