DateTime.fromSimpleString

DateTime fromSimpleString(S)(scope const S simpleString) if (isSomeString!(S)) @safe pure

Creates a DateTime from a string with the format YYYY-Mon-DD HH:MM:SS. Whitespace is stripped from the given string.

Parameters

simpleStringA string formatted in the way that toSimpleString formats dates and times.

Throws

DateTimeException if the given string is

not in the correct format or if the resulting DateTime would not be valid.