# dateutil: Powerful Extensions for Python's Datetime Module

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/dateutil-dateutil
Generated for open source discovery and AI-assisted research.

dateutil is a Python library that provides powerful extensions to the standard `datetime` module. It offers advanced features for parsing dates in almost any string format, computing relative deltas, and handling complex recurrence rules. This makes it an essential tool for developers working with time and date manipulations in Python.

GitHub: https://github.com/dateutil/dateutil
OSRepos URL: https://osrepos.com/repo/dateutil-dateutil

## Summary

dateutil is a Python library that provides powerful extensions to the standard `datetime` module. It offers advanced features for parsing dates in almost any string format, computing relative deltas, and handling complex recurrence rules. This makes it an essential tool for developers working with time and date manipulations in Python.

## Topics

- python
- datetime
- time
- timezones
- parsing
- library
- utility
- development

## Repository Information

Last analyzed by OSRepos: Fri Mar 27 2026 16:49:25 GMT+0000 (Western European Standard Time)
Detail views: 3
GitHub clicks: 3

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

The `dateutil` module is a robust Python library designed to extend the capabilities of the standard `datetime` module. It provides powerful functionalities for handling dates and times, making complex date manipulations simpler and more intuitive. From parsing diverse date string formats to calculating relative deltas and managing timezones, `dateutil` offers a comprehensive suite of tools for Python developers.

## Installation

You can easily install `dateutil` using pip:

bash
pip install python-dateutil


## Examples

Here's a quick example demonstrating some of `dateutil`'s capabilities, taken from its official documentation:

python
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)
print("Year with next Aug 13th on a Friday is: %s" % year)
print("How far is the Easter of that year: %s" % rdelta)
print("And the Easter of that year is: %s" % (today+rdelta))

# Expected Output:
# Today is: 2003-10-11
# Year with next Aug 13th on a Friday is: 2004
# How far is the Easter of that year: relativedelta(months=+6)
# And the Easter of that year is: 2004-04-11


## Why Use It

`dateutil` stands out for its extensive feature set, making it indispensable for advanced date and time operations. Key reasons to integrate `dateutil` into your projects include:

*   **Flexible Date Parsing**: Parse dates from nearly any string format, offering robust and generic parsing capabilities.
*   **Relative Deltas**: Easily compute relative time differences, such as "next month," "next Monday," or "last week of month," simplifying complex date arithmetic.
*   **Recurrence Rules**: Generate dates based on very flexible recurrence rules, using a superset of the iCalendar specification, including parsing of RFC strings.
*   **Comprehensive Timezone Support**: Handle various timezone formats, including tzfile(5) format files, TZ environment strings, iCalendar format files, and Windows registry-based time zones, with internal up-to-date world timezone information based on Olson's database.
*   **Easter Sunday Calculation**: Accurately determine Easter Sunday dates for any given year, using Western, Orthodox, or Julian algorithms.

## Links

For more information, documentation, and to contribute, visit the official `dateutil` resources:

*   [GitHub Repository](https://github.com/dateutil/dateutil){:target="_blank"}
*   [PyPI Package](https://pypi.org/project/python-dateutil/){:target="_blank"}
*   [Official Documentation](https://dateutil.readthedocs.io/en/stable/){:target="_blank"}