The Python package annual provides date calculations with human-readable expressions.
Before you begin, ensure you have met the following requirements:
- You have installed Python 3.11 or later. annual is compatible with Python 3.11+.
- You have a basic understanding of Python programming.
- (Optional) For development: You have
git
installed for version control.
annual can be installed using pip. To install annual, follow these steps:
- Open your terminal (Command Prompt on Windows).
- Run the following command:
pip install annual
The simplest way of using this package is invoking the rule parser directly. The following example shows how to compute the second monday in October for the year 2024.
>>> from annual.ruleparser import rule_parser
>>> rule_parser(2024).parse('2nd monday of october')
datetime.date(2024, 10, 14)
For a full overview of the syntax supported by the rule parser consult the Syntax Guide.
For more detailed information about DateCalc, please refer to our comprehensive documentation:
-
User Guide: For in-depth explanations of annual's features and how to use them effectively, visit our User Guide.
-
API Reference: For detailed information about annual's classes, methods, and functions, check out our API Reference.
-
Tutorials: To get started quickly with practical examples, see our Tutorials.
-
FAQ: For answers to commonly asked questions, visit our FAQ page.
-
Contributing: If you're interested in contributing to annual, please read our Contribution Guidelines.
Our documentation is hosted on Read the Docs and is kept up-to-date with each release. You can find the full documentation at:
If you can't find the information you're looking for, please open an issue on our GitHub repository. We're always looking to improve our documentation and appreciate your feedback!
This package is released under the terms of the MIT License.
dateutil
: extensions to the standard Python datetime moduleDelorean
: library for manipulating datetimes with ease and claritydateparser
: date parsing library designed to parse dates from HTML pagesworkalendar
: worldwide holidays and working days helper and toolkitconvertdate
: converts between Gregorian dates and other calendar systems