🔵 🔵 🔵


Primary

၊၊||၊|။

dateutil.parser ⚬|Documentation|1st|20251021210329-00-⌔

parser — dateutil 3.9.0 documentation#module-dateutil.parser

parser

This module offers a generic date/time string parser which is able to parse most known formats to represent a date and/or time.

This module attempts to be forgiving with regards to unlikely input formats, returning a datetime object even for dates which are ambiguous. If an element of a date/time stamp is omitted, the following rules are applied:

  • If AM or PM is left unspecified, a 24-hour clock is assumed, however, an hour on a 12-hour clock (0 <= hour <= 12) must be specified if AM or PM is specified.
  • If a time zone is omitted, a timezone-naive datetime is returned.

If any other elements are missing, they are taken from the datetime.datetime object passed to the parameter default. If this results in a day number exceeding the valid number of days per month, the value falls back to the end of the month.

Additional resources about date/time string formats can be found below:

  • A summary of the international standard date and time notation
  • W3C Date and Time Formats
  • Time Formats (Planetary Rings Node)
  • CPAN ParseDate module
  • Java SimpleDateFormat Class

Printed 2026-06-28.

(echo:: @ )

Link to original

Secondary

• • •