module documentation

Functions to parse datetime objects.
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
def parse_date(value):

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.

def parse_datetime(value):

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.

def parse_duration(value):

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.

def parse_time(value):

Parse a string and return a datetime.time.

This function doesn't support time zone offsets.

Raise ValueError if the input is well formatted but not a valid time. Return None if the input isn't well formatted, in particular if it contains an offset.

date_re =

Undocumented

datetime_re =

Undocumented

iso8601_duration_re =

Undocumented

postgres_interval_re =

Undocumented

standard_duration_re =

Undocumented

time_re =

Undocumented