Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

python-dateutil

Read dates and do calendar math in Python.

UtilitiesPYPI

GitHubWebsite

1. License

“All contributions after December 1, 2017 released under dual license - either Apache 2.0 License or the BSD 3-Clause License”

Paid and closed-source use is allowed under BSD-3-Clause (and Apache-2.0 for newer code).

dateutil.readthedocs.io/en/stable/

From the package registry and GitHub, checked daily; card checked Nov 10, 2026. Tap a verdict to see its source.How we checkedReport an error

What python-dateutil does

python-dateutil is a free add-on for Python's own date and time tools. Your app can read dates typed in many formats and add months without landing on a day that does not exist. It can also list repeating dates like "last workday of each month" and show a time in another city's time zone.

What people build with it

Read dates people type

A form, an email or an imported spreadsheet gives "March 3rd, 2027 at 4:30pm" or "03/04/2027 9am". Your app turns each into a real date it can sort and store.

Monthly billing on the 31st

A customer subscribes on January 31; each renewal falls on the last day of shorter months instead of skipping into March.

Repeating dates for payouts

Payouts, reports or reminders happen on "the last workday of each month" or "every second Tuesday"; your app lists the next dates from one rule.

One meeting time for every city

A booking page shows a call set for 15:00 in Berlin as the matching local time in New York and Tokyo, with summer time handled.

Repeat rules from calendar files

A calendar export says "FREQ=WEEKLY;BYDAY=TU;COUNT=3"; your app turns that rule into the actual meeting dates.

Age or time as a member

A profile page shows "member for 2 years, 3 months" or checks that a user is at least 18 from the birth date.

python-dateutil popularity

74 / 100
Gid Score, #254 overall
287M
downloads a week, pypi
2,646
GitHub stars
100
agent projects use it
python-dateutil: downloads per weekPyPI, python-dateutil 285,307,493
python-dateutil: GitHub starsdateutil/dateutil 2,646

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How python-dateutil is used

  • python-dateutil is a dependency in 100 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (6.2% of the 1,623 Python ones), #11 of 408 in utilities.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,483; those are left out of every share on this page.
  • Projects that use it most often also use Requests (69.0%), NumPy (66.0%), Pydantic (65.0%).

By coding agent

56 projects, 1.7%
41 projects, 1.4%
39 projects, 1.6%
9 projects, 2.7%
5 projects, 1.8%
5 projects, 1.1%
5 projects, 1.1%

Often used with

In 69.0% of its projects
In 66.0% of its projects
In 65.0% of its projects
In 55.0% of its projects
In 53.0% of its projects
In 52.0% of its projects
In 50.0% of its projects
In 50.0% of its projects

More about python-dateutil

More in Utilities

Alternatives

python-dateutil This page

BSD-3-ClauseGid 74287M/wk

dateparser

Pick dateparser when users write dates in plain words or in other languages, like "in two days", which dateutil does not read.

Pendulum

Pick Pendulum when you want one date object that handles time zones for you, instead of adding pieces to Python's own dates.

Arrow

Pick Arrow for a friendlier, all-in-one way to create, format and convert dates in Python.

Compare python-dateutil with another tool

Get started

Tell your AI assistant

“Use python-dateutil (pin python-dateutil==4.0.0, Python 3.11+) to parse the dates users type with dayfirst set for our locale, compute monthly renewal dates by adding relativedelta(months=n) to the original start date, and convert meeting times with tz.gettz.”

  1. Install it under its package name python-dateutil; in code you import dateutil.

    pip install python-dateutil

    From dateutil.readthedocs.io/en/stable/

  2. Read a date from text. Missing parts come from a default date you pass in.

    >>> from dateutil.parser import parse
    >>> parse("Today is January 1, 2047 at 8:21:00AM", fuzzy_with_tokens=True)
    (datetime.datetime(2047, 1, 1, 8, 21), (u'Today is ', u' ', u'at '))
    

    From dateutil.readthedocs.io/en/stable/parser.html

  3. Add months, weeks or a weekday to a date with relativedelta.

    >>> NOW + relativedelta(months=+1, weeks=+1)
    datetime.datetime(2003, 10, 24, 20, 54, 47, 282310)
    

    From dateutil.readthedocs.io/en/stable/relativedelta.html

Mistakes to avoid

pip install dateutil
pip install python-dateutil==4.0.0, then import dateutil in code

The package name and the import name differ.

next = previous + relativedelta(months=1) in a loop, starting from January 31
next = start + relativedelta(months=n) from the original start date

Adding to the previous result drifts: in our run the chain gave Feb 28, then Mar 28 and Apr 28 instead of Mar 31 and Apr 30.

isoparse("20200728121240") or other squeezed digits without separators
Send full ISO strings such as 2020-07-28T12:12:40Z, or use parser.parse for loose input

Since 4.0 isoparse needs each field to have exactly the expected digits; our run raised ValueError: Expected 2 digits.

parse("03/04/2027") for European users
parse("03/04/2027", dayfirst=True), or ask for an unambiguous format such as 2027-04-03

By default the first number is the month, so our run read it as March 4, not April 3.

Storing parse("March 3 2027 4pm") as is and comparing it with dates that have a time zone
Attach the user's zone (dt.replace(tzinfo=tz.gettz(user_zone))) or pass a default with a zone before you store it

Text without a zone gives a date with no zone, and Python refuses to compare it with zoned dates.

Questions

Why does pip install dateutil not work?

The package is called python-dateutil; only the name you import in code is dateutil.

What happens when I add one month to January 31?

You get the last day of February. Adding months never jumps past the end of the shorter month.

Does a parsed date know its time zone?

Only if the text has one. Without a zone you get a date with no time zone attached.

Can I use it in a paid product?

Yes. It is under BSD-3-Clause, and newer code also under Apache-2.0; keep the copyright notice in copies you ship.

Is the project still maintained?

Yes. Version 4.0.0 came out on 2026-11-01, eleven days after 3.0.0.