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): (source)

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): (source)

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): (source)

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): (source)

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.

Undocumented

datetime_re = (source)

Undocumented

iso8601_duration_re = (source)

Undocumented

postgres_interval_re = (source)

Undocumented

standard_duration_re = (source)

Undocumented

Undocumented