dateutil: Powerful Extensions for Python's Datetime Module
This repository profile is provided by osrepos.com, an open source repository discovery platform.

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.
Repository Information
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
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:
pip install python-dateutil
Examples
Here's a quick example demonstrating some of dateutil's capabilities, taken from its official documentation:
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:
Related repositories
Similar repositories that may be relevant next.
OpenSandbox: A Secure and Extensible Sandbox Runtime for AI Agents
August 12, 2026
OpenSandbox is a powerful, general-purpose sandbox platform designed for AI applications. It provides secure, fast, and extensible runtime environments, supporting multi-language SDKs and Docker/Kubernetes deployments. This project is ideal for developing and evaluating AI agents in isolated, controlled settings.

FastMCP: The Pythonic Framework for Model Context Protocol Applications
August 11, 2026
FastMCP is a robust, Pythonic framework developed by PrefectHQ, designed to simplify the creation of Model Context Protocol (MCP) servers and clients. It provides a comprehensive application framework for connecting Large Language Models (LLMs) to tools and data, handling complexities like schema generation, validation, and protocol lifecycle. As the standard framework for MCP, FastMCP empowers developers to build powerful LLM-integrated applications efficiently.

nanobot: An Ultra-Lightweight, Self-Hosted Personal AI Agent Framework
August 9, 2026
nanobot is an ultra-lightweight, open-source, self-hosted personal AI agent framework built in Python. It offers a WebUI, tools, memory, multi-agent workflows, and automation capabilities, making it a versatile solution for personal AI tasks. Users can deploy it across various platforms, including chat apps, for seamless integration.

ReMe: An Advanced Memory Management Kit for AI Agents
August 7, 2026
ReMe is an innovative, local-first memory layer designed for AI agents, transforming conversations and resources into file-based long-term memory. It continuously indexes, links, and consolidates this information, enabling advanced recall and supporting the development of self-evolving agents. This kit helps agents remember and refine their experiences effectively.
Source repository
Open the original repository on GitHub.
13 counted GitHub visits