{"name":"dateutil: Powerful Extensions for Python's Datetime Module","description":"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","url":"https://osrepos.com/repo/dateutil-dateutil","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/dateutil-dateutil","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/dateutil-dateutil.md","json":"https://osrepos.com/repo/dateutil-dateutil.json","topics":["python","datetime","time","timezones","parsing","library","utility","development"],"keywords":["python","datetime","time","timezones","parsing","library","utility","development"],"stars":null,"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.","content":"## Introduction\n\nThe `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.\n\n## Installation\n\nYou can easily install `dateutil` using pip:\n\nbash\npip install python-dateutil\n\n\n## Examples\n\nHere's a quick example demonstrating some of `dateutil`'s capabilities, taken from its official documentation:\n\npython\nfrom dateutil.relativedelta import *\nfrom dateutil.easter import *\nfrom dateutil.rrule import *\nfrom dateutil.parser import *\nfrom datetime import *\n\nnow = parse(\"Sat Oct 11 17:13:46 UTC 2003\")\ntoday = now.date()\nyear = rrule(YEARLY,dtstart=now,bymonth=8,bymonthday=13,byweekday=FR)[0].year\nrdelta = relativedelta(easter(year), today)\n\nprint(\"Today is: %s\" % today)\nprint(\"Year with next Aug 13th on a Friday is: %s\" % year)\nprint(\"How far is the Easter of that year: %s\" % rdelta)\nprint(\"And the Easter of that year is: %s\" % (today+rdelta))\n\n# Expected Output:\n# Today is: 2003-10-11\n# Year with next Aug 13th on a Friday is: 2004\n# How far is the Easter of that year: relativedelta(months=+6)\n# And the Easter of that year is: 2004-04-11\n\n\n## Why Use It\n\n`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:\n\n*   **Flexible Date Parsing**: Parse dates from nearly any string format, offering robust and generic parsing capabilities.\n*   **Relative Deltas**: Easily compute relative time differences, such as \"next month,\" \"next Monday,\" or \"last week of month,\" simplifying complex date arithmetic.\n*   **Recurrence Rules**: Generate dates based on very flexible recurrence rules, using a superset of the iCalendar specification, including parsing of RFC strings.\n*   **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.\n*   **Easter Sunday Calculation**: Accurately determine Easter Sunday dates for any given year, using Western, Orthodox, or Julian algorithms.\n\n## Links\n\nFor more information, documentation, and to contribute, visit the official `dateutil` resources:\n\n*   [GitHub Repository](https://github.com/dateutil/dateutil){:target=\"_blank\"}\n*   [PyPI Package](https://pypi.org/project/python-dateutil/){:target=\"_blank\"}\n*   [Official Documentation](https://dateutil.readthedocs.io/en/stable/){:target=\"_blank\"}","metrics":{"detailViews":3,"githubClicks":3},"dates":{"published":null,"modified":"2026-03-27T16:49:25.000Z"}}