dateutil: Powerful Extensions for Python's Datetime Module

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

dateutil: Powerful Extensions for Python's Datetime Module

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

Analyzed by OSRepos on March 27, 2026

Topics

Click on any tag to explore related repositories

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.

OpenMontage: The First Open-Source, Agentic Video Production System

OpenMontage: The First Open-Source, Agentic Video Production System

June 29, 2026

OpenMontage is the world's first open-source, agentic video production system, designed to transform your AI coding assistant into a full video production studio. It features 12 pipelines, 52 tools, and over 500 agent skills, enabling end-to-end video creation from a simple prompt. This powerful tool handles research, scripting, asset generation, editing, and final composition, including the unique ability to produce real video from stock footage.

agentic-aivideo-productionopen-source
MarkLLM: An Open-Source Toolkit for LLM Watermarking

MarkLLM: An Open-Source Toolkit for LLM Watermarking

June 23, 2026

MarkLLM is an open-source toolkit designed to simplify the research and application of watermarking technologies for large language models (LLMs). It offers a unified framework for implementing various watermarking algorithms, alongside robust visualization and comprehensive evaluation tools. This toolkit helps researchers and the broader community understand and assess the authenticity and origin of machine-generated text.

large-language-modelsllmsafety
Agent-Reach: Empower Your AI Agents with Internet Access, Zero API Fees

Agent-Reach: Empower Your AI Agents with Internet Access, Zero API Fees

June 21, 2026

Agent-Reach is a powerful GitHub repository that equips AI agents with the ability to access and search the entire internet, including platforms like Twitter, Reddit, YouTube, and Bilibili. It provides a streamlined CLI experience, eliminating the need for complex API configurations and associated fees. This project ensures your AI agent can "see" and interact with web content effortlessly.

ai-agentagent-infrastructureai-search
REAL Video Enhancer: AI-Powered Video Interpolation, Upscaling, and Denoising

REAL Video Enhancer: AI-Powered Video Interpolation, Upscaling, and Denoising

June 19, 2026

REAL Video Enhancer is a powerful open-source application designed to enhance video quality across Linux, Windows, and macOS. It leverages AI models for advanced video processing tasks such as frame interpolation, upscaling, decompression, and denoising. This tool provides a modern alternative to older software, making high-quality video enhancement accessible to a wider audience.

video-enhancementaiupscaling

Source repository

Open the original repository on GitHub.

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️