strptime(str='-4712-01-01T00:00:00+00:00', fmt='%FT%T%z', sg=ITALY) public

Create a new DateTime object by parsing from a String according to a specified format.

str is a String holding a date-time representation. fmt is the format that the date-time is in. See date/format.rb for details on supported formats.

The default str is ā€˜-4712-01-01T00:00:00+00:00ā€™, and the default fmt is ā€˜%FT%T%zā€™. This gives midnight on Julian Day Number day 0.

sg specifies the Day of Calendar Reform.

An ArgumentError will be raised if str cannot be parsed.

Show source
Register or log in to add new notes.