Skip to main content

[!NOTE] This package is rewrite of python-dateutil v2.9.0.post0 as base, to support active python versions only.
It is not related with the base project and its authors.
Docs of base project are under .base_project/

dateutilx - powerful extensions to datetime

Compatibility Py-Version
Quality Checks lint check tests pre-commit
Package pypi-v pypi-downloads
MetaData license-badge

The dateutilx module provides powerful extensions to the standard datetime module, available in Python.

Installation

dateutilx can be installed from PyPI using pip

pip install dateutilx

Download

dateutilx is available on PyPI https://pypi.org/project/dateutilx/

The documentation is hosted at: https://dateutilx.readthedocs.io/en/stable/

Code

The code and issue tracker are hosted on GitHub: https://github.com/rsb-23/dateutilx/

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 datetime import *
>>> from dateutilx.easter import *
>>> from dateutilx.parser import *
>>> from dateutilx.relativedelta import RelativeDelta
>>> from dateutilx.rrule 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 dateutilx module is improved/re-written by rsb-23 in 2026.

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.

Metadata

Release files for dateutilx 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dateutilx 0.3.0
File Size Uploaded
dateutilx-0.3.0.tar.gz 67.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dateutilx 0.3.0
File Interpreter ABI Platform
dateutilx-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 142.3 kB

Release files / dateutilx-0.3.0.tar.gz

Download URL dateutilx-0.3.0.tar.gz
Size 67.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a4699785c5da176c5a4f843f306d4ce3d460bc9096cec55af3bffc5111c81875
BLAKE2b-256 checksum
How to use checksums
d7a6c1329d219cb59b3ae9093110d0d74b20f5c9b101729c6f5d5cdfc6905258
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Aug 4, 2026.

Transparency log

Release files / dateutilx-0.3.0-py3-none-any.whl

Download URL dateutilx-0.3.0-py3-none-any.whl
Size 75.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77d1f14f0ae992d1603473cc9b5aee2453f7f9125bdfa5da661e24e19825e5cc
BLAKE2b-256 checksum
How to use checksums
f536ed575fedac6ee7faf4ba86524730cb779dcfab75fa98f029b6a411df38ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Aug 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page