Convert an input string to a date under the control of a template string. Return a newly created date object.
Literal characters in template must match characters in input and ‘~’ escapes must match the input forms described in the table below. “Skip to” means characters up to one of the given type are ignored, or “no skip” for no skipping. “Read” is what’s then read, and “Set” is the field affected in the date object.
For example ‘~Y’ skips input characters until a digit is reached, at which point it expects a year and stores that to the year field of the date.
|locale abbreviated weekday name
|locale full weekday name
|locale abbreviated month name
|locale full month name
|day of month
|day of month, blank padded
|same as ‘~b’
|hour, blank padded
date-year within 50 years
Notice that the weekday matching forms don’t affect the date object returned, instead the weekday will be derived from the day, month and year.