Function | parse_date |
Parse a string and return a datetime.date. |
Function | parse_datetime |
Parse a string and return a datetime.datetime. |
Function | parse_duration |
Parse a duration string and return a datetime.timedelta. |
Function | parse_time |
Parse a string and return a datetime.time. |
Variable | date_re |
Undocumented |
Variable | datetime_re |
Undocumented |
Variable | iso8601_duration_re |
Undocumented |
Variable | postgres_interval_re |
Undocumented |
Variable | standard_duration_re |
Undocumented |
Variable | time_re |
Undocumented |
Parse a string and return a datetime.date.
Raise ValueError if the input is well formatted but not a valid date. Return None if the input isn't well formatted.
Parse a string and return a datetime.datetime.
This function supports time zone offsets. When the input contains one, the output uses a timezone with a fixed offset from UTC.
Raise ValueError if the input is well formatted but not a valid datetime. Return None if the input isn't well formatted.
Parse a duration string and return a datetime.timedelta.
The preferred format for durations in Django is '%d %H:%M:%S.%f'.
Also supports ISO 8601 representation and PostgreSQL's day-time interval format.