parse

Parse the given datetime string with the given format string.

This tries rather hard to produce a reasonable result. If the format string doesn't describe an unambiguous point time, the result will be a date that satisfies the inputs and should generally be the earliest such date. However, that is not guaranteed.

For instance:

SysTime time = parse("%d", "21");
writeln(time);  // 0000-01-21T00:00:00.000000Z
SysTime
parse
(
string data
,,
immutable(TimeZone) defaultTimeZone = null
,
bool allowTrailingData = false
)

Meta