python-dateutil 4.0.0
Extensions to the standard Python datetime module
pip install python-dateutil
dateutil - powerful extensions to datetime
The dateutil module provides powerful extensions to the standard datetime module, available in Python.
Installation
dateutil can be installed from PyPI using pip (note that the package name is different from the importable name):
pip install python-dateutil
Download
dateutil is available on PyPI https://pypi.org/project/python-dateutil/
The documentation is hosted at: https://dateutil.readthedocs.io/en/stable/
Code
The code and issue tracker are hosted on GitHub: https://github.com/dateutil/dateutil/
Features
Computing of relative deltas (next month, next year, next Monday, last week of month, etc);
Computing of relative deltas between two given date and/or datetime objects;
Computing of dates based on very flexible recurrence rules, using a superset of the iCalendar specification. Parsing of RFC strings is supported as well.
Generic parsing of dates in almost any string format;
Timezone (tzinfo) implementations for tzfile(5) format files (/etc/localtime, /usr/share/zoneinfo, etc), TZ environment string (in all known formats), iCalendar format files, given ranges (with help from relative deltas), local machine timezone, fixed offset timezone, UTC timezone, and Windows registry-based time zones.
Internal up-to-date world timezone information based on Olson’s database.
Computing of Easter Sunday dates for any given year, using Western, Orthodox or Julian algorithms;
A comprehensive test suite.
Quick example
Here’s a snapshot, just to give an idea about the power of the package. For more examples, look at the documentation.
Suppose you want to know how much time is left, in years/months/days/etc, before the next easter happening on a year with a Friday 13th in August, and you want to get today’s date out of the “date” unix system command. Here is the code:
>>> from dateutil.relativedelta import *
>>> from dateutil.easter import *
>>> from dateutil.rrule import *
>>> from dateutil.parser import *
>>> from datetime import *
>>> now = parse("Sat Oct 11 17:13:46 UTC 2003")
>>> today = now.date()
>>> year = rrule(YEARLY,dtstart=now,bymonth=8,bymonthday=13,byweekday=FR)[0].year
>>> rdelta = relativedelta(easter(year), today)
>>> print("Today is: %s" % today)
Today is: 2003-10-11
>>> print("Year with next Aug 13th on a Friday is: %s" % year)
Year with next Aug 13th on a Friday is: 2004
>>> print("How far is the Easter of that year: %s" % rdelta)
How far is the Easter of that year: relativedelta(months=+6)
>>> print("And the Easter of that year is: %s" % (today+rdelta))
And the Easter of that year is: 2004-04-11
Being exactly 6 months ahead was really a coincidence :)
Contributing
We welcome many types of contributions - bug reports, pull requests (code, infrastructure or documentation fixes). For more information about how to contribute to the project, see the CONTRIBUTING.md file in the repository.
Author
The dateutil module was written by Gustavo Niemeyer <gustavo@niemeyer.net> in 2003.
It is maintained by:
Gustavo Niemeyer <gustavo@niemeyer.net> 2003-2011
Tomi Pieviläinen <tomi.pievilainen@iki.fi> 2012-2014
Yaron de Leeuw <me@jarondl.net> 2014-2016
Paul Ganssle <paul@ganssle.io> 2015-
Starting with version 2.4.1 and running until 2.8.2, all source and binary distributions will be signed by a PGP key that has, at the very least, been signed by the key which made the previous release. A table of release signing keys can be found below:
Releases |
Signing key fingerprint |
|---|---|
2.4.1-2.8.2 |
New releases may have signed tags, but binary and source distributions uploaded to PyPI will no longer have GPG signatures attached.
License
All contributions after December 1, 2017 released under dual license - either Apache 2.0 License or the BSD 3-Clause License. Contributions before December 1, 2017 - except those those explicitly relicensed - are released only under the BSD 3-Clause License.
Project links
Data verified by PyPI on Nov 1, 2026 Data provided by the project maintainers, verified at the time the release was uploaded to PyPI.Key dates
PyPI data Data sourced directly from PyPI's database.- Released: Nov 1, 2026
4 maintainers
PyPI data Data sourced directly from PyPI's database.Credits
Author: Gustavo Niemeyer
Maintainer: Paul Ganssle
GitHub Statistics
Data verified by PyPI on Nov 1, 2026 The GitHub source repository was provided by the project maintainers and verified by PyPI at the time of upload. Stars, forks, and open issues/PRs are derived from that repository and have not been independently verified.Provenance
Data verified by PyPI on Nov 1, 2026 Data provided by the project maintainers and verified by PyPI at the time of upload.Full provenance
Both files in this release have provenance metadata.
License expression
BSD-3-Clause
View SPDX License List
Requires
Python >=3.11
Classifiers
- Development Status
- Intended Audience
- Programming Language
- Topic
Metadata
Project links
Data verified by PyPI on Nov 1, 2026 Data provided by the project maintainers, verified at the time the release was uploaded to PyPI.Key dates
PyPI data Data sourced directly from PyPI's database.- Released: Nov 1, 2026
4 maintainers
PyPI data Data sourced directly from PyPI's database.Credits
Author: Gustavo Niemeyer
Maintainer: Paul Ganssle
GitHub Statistics
Data verified by PyPI on Nov 1, 2026 The GitHub source repository was provided by the project maintainers and verified by PyPI at the time of upload. Stars, forks, and open issues/PRs are derived from that repository and have not been independently verified.Provenance
Data verified by PyPI on Nov 1, 2026 Data provided by the project maintainers and verified by PyPI at the time of upload.Full provenance
Both files in this release have provenance metadata.
License expression
BSD-3-Clause
View SPDX License List
Requires
Python >=3.11
Classifiers
- Development Status
- Intended Audience
- Programming Language
- Topic
Release files for python-dateutil 4.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_dateutil-4.0.0.tar.gz | 250.4 kB | Nov 1, 2026 | With provenance | Details for python_dateutil-4.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_dateutil-4.0.0-py3-none-any.whl 92.9 kB Nov 1, 2026 With provenance | Python 3 | none | any | Details for python_dateutil-4.0.0-py3-none-any.whl |
Total release size: 343.3 kB
Release files / python_dateutil-4.0.0.tar.gz
| Download URL | python_dateutil-4.0.0.tar.gz |
|---|---|
| Size | 250.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7295ff14fdc0f92f662100bfb6c551d160ca090f2939f1ec5b9794265c03f06
|
|
BLAKE2b-256 checksum How to use checksums |
1839b3927f3616f6223832f9b760e4208e8a7c7e1dea2b4d9ad7d32a5d214c3a
|
| Upload date | Nov 1, 2026 |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logIdentity
- Publishing platform
- GitHub Actions
- Publishing repository
- github.com/dateutil/dateutil
- Publishing commit
- github.com/dateutil/dateutil/tree/a78cbd81d5d03b5f126eb36edb92bca78972c804
Workflow
- Publishing configuration
- github.com/dateutil/dateutil/blob/a78cbd81d5d03b5f126eb36edb92bca78972c804/.github/workflows/publish.yml
- Publishing logs
- github.com/dateutil/dateutil/actions/runs/41282987729/attempts/1
Artifact
- Subject
-
python_dateutil-4.0.0.tar.gz - SHA-256 checksum
-
d7295ff14fdc0f92f662100bfb6c551d160ca090f2939f1ec5b9794265c03f06Verifying attestations
Release files / python_dateutil-4.0.0-py3-none-any.whl
| Download URL | python_dateutil-4.0.0-py3-none-any.whl |
|---|---|
| Size | 92.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5e246f79eb80475e691bf93862cead98decd8a498cf53ba0516fcdc0f50dc1c
|
|
BLAKE2b-256 checksum How to use checksums |
2fa952b89563d154433d79b51ed1eb4842bf7334cb2696891a7fe135618853d7
|
| Upload date | Nov 1, 2026 |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logIdentity
- Publishing platform
- GitHub Actions
- Publishing repository
- github.com/dateutil/dateutil
- Publishing commit
- github.com/dateutil/dateutil/tree/a78cbd81d5d03b5f126eb36edb92bca78972c804
Workflow
- Publishing configuration
- github.com/dateutil/dateutil/blob/a78cbd81d5d03b5f126eb36edb92bca78972c804/.github/workflows/publish.yml
- Publishing logs
- github.com/dateutil/dateutil/actions/runs/41282987729/attempts/1
Artifact
- Subject
-
python_dateutil-4.0.0-py3-none-any.whl - SHA-256 checksum
-
a5e246f79eb80475e691bf93862cead98decd8a498cf53ba0516fcdc0f50dc1cVerifying attestations
Security for python-dateutil 4.0.0
Report project as malwareProvenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Select from 2 files No files match the current filters. Reset filtersAttestation for python_dateutil-4.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logIdentity
- Publishing platform
- GitHub Actions
- Publishing repository
- github.com/dateutil/dateutil
- Publishing commit
- github.com/dateutil/dateutil/tree/a78cbd81d5d03b5f126eb36edb92bca78972c804
Workflow
- Publishing configuration
- github.com/dateutil/dateutil/blob/a78cbd81d5d03b5f126eb36edb92bca78972c804/.github/workflows/publish.yml
- Publishing logs
- github.com/dateutil/dateutil/actions/runs/41282987729/attempts/1
Artifact
- Subject
-
python_dateutil-4.0.0.tar.gz - SHA-256 checksum
-
d7295ff14fdc0f92f662100bfb6c551d160ca090f2939f1ec5b9794265c03f06Verifying attestations
Attestation for python_dateutil-4.0.0-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logIdentity
- Publishing platform
- GitHub Actions
- Publishing repository
- github.com/dateutil/dateutil
- Publishing commit
- github.com/dateutil/dateutil/tree/a78cbd81d5d03b5f126eb36edb92bca78972c804
Workflow
- Publishing configuration
- github.com/dateutil/dateutil/blob/a78cbd81d5d03b5f126eb36edb92bca78972c804/.github/workflows/publish.yml
- Publishing logs
- github.com/dateutil/dateutil/actions/runs/41282987729/attempts/1
Artifact
- Subject
-
python_dateutil-4.0.0-py3-none-any.whl - SHA-256 checksum
-
a5e246f79eb80475e691bf93862cead98decd8a498cf53ba0516fcdc0f50dc1cVerifying attestations
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
This release4.0.0 This release
Nov 1, 2026 2 release files Full provenance
3.0.0
Oct 21, 2026 2 release files Full provenance
2.9.0.post0
Mar 1, 2024 2 release files No provenance
2.9.0
Mar 1, 2024 2 release files No provenance
2.8.2
Jul 14, 2021 2 release files No provenance
2.8.1
Nov 3, 2019 2 release files No provenance
2.8.0
Feb 5, 2019 2 release files No provenance
2.7.5
Oct 27, 2018 2 release files No provenance
2.7.4
Oct 25, 2018 2 release files No provenance
2.7.3
May 10, 2018 2 release files No provenance
2.7.2
Mar 26, 2018 2 release files No provenance
2.7.1
Mar 24, 2018 2 release files No provenance
2.7.0
Mar 11, 2018 2 release files No provenance
2.6.1
Jul 10, 2017 2 release files No provenance
2.6.0
Nov 8, 2016 3 release files No provenance
2.5.3
Apr 21, 2016 3 release files No provenance
2.5.2
Mar 27, 2016 3 release files No provenance
2.5.1
Mar 17, 2016 3 release files No provenance
2.5.0
Feb 28, 2016 3 release files No provenance
2.4.2
Mar 31, 2015 2 release files No provenance
2.4.1
Mar 5, 2015 4 release files No provenance
2.4.0
Jan 5, 2015 2 release files No provenance
2.3
Dec 1, 2014 2 release files No provenance
2.2
Nov 1, 2013 1 release file No provenance
2.1
Mar 28, 2012 1 release file No provenance
2.0
Dec 1, 2011
1.5
Mar 29, 2010 1 release file No provenance
1.4.1
Aug 6, 2008 1 release file No provenance
1.4
Feb 28, 2008 1 release file No provenance
1.2
Jun 26, 2007
1.1
Dec 22, 2005
1.0
Jul 19, 2005
0.5
Jul 16, 2004
0.4
Mar 19, 2004
0.3
Oct 11, 2003
0.1
Oct 9, 2003