https://github.com/tom65536/annual
Python package for computing annual recurring events. Recurrence rules are described by a human-friendly mini-language.
https://github.com/tom65536/annual
calendar date holidays library observances parser python
Last synced: 5 months ago
JSON representation
Python package for computing annual recurring events. Recurrence rules are described by a human-friendly mini-language.
- Host: GitHub
- URL: https://github.com/tom65536/annual
- Owner: tom65536
- License: mit
- Created: 2024-05-16T19:31:41.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-14T03:48:50.000Z (almost 2 years ago)
- Last Synced: 2025-09-23T12:01:03.578Z (9 months ago)
- Topics: calendar, date, holidays, library, observances, parser, python
- Language: Python
- Homepage:
- Size: 81.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# annual
[](https://pypi.org/project/nnual)

[](https://www.bestpractices.dev/projects/8996)
[](https://github.com/pre-commit/pre-commit)
[](https://pycqa.github.io/isort/)
[](https://app.codacy.com/gh/tom65536/annual/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)

[](https://app.codacy.com/gh/tom65536/annual/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
## Synopsis
The Python package _annual_ provides date calculations
with human-readable expressions.
## Prerequisites
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.
## Installation
_annual_ can be installed using pip.
To install _annual_, follow these steps:
1. Open your terminal (Command Prompt on Windows).
2. Run the following command:
```sh
pip install annual
```
## Usage
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.
```python
>>> 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](https://annual.readthedocs.io/latest/syntax.html).
## Additional Documentation
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](https://annual.readthedocs.io/latest/user_guide.html).
- **API Reference**: For detailed information about _annual_'s classes, methods, and functions, check out our [API Reference](https://annual.readthedocs.io/latest/autoapi/).
- **Tutorials**: To get started quickly with practical examples, see our [Tutorials](https://annual.readthedocs.io/latest/tutorials.html).
- **FAQ**: For answers to commonly asked questions, visit our [FAQ page](https://annual.readthedocs.io/latest/faq.html).
- **Contributing**: If you're interested in contributing to _annual_,
please read our [Contribution Guidelines](CONTRIBUTING.md).
Our documentation is hosted on Read the Docs and is kept up-to-date
with each release. You can find the full documentation at:
[https://annual.readthedocs.io](https://annuam.readthedocs.io)
If you can't find the information you're looking for, please [open an issue](https://github.com/tom6t536/annual/issues) on our GitHub repository. We're always looking to improve our documentation and appreciate your feedback!
## License
This package is released under the terms of the MIT License.
## Related Libraries
- [`dateutil`](https://pypi.org/project/python-dateutil/): extensions to the standard Python datetime module
- [`Delorean`](https://pypi.org/project/Delorean/): library for manipulating datetimes with ease and clarity
- [`dateparser`](https://pypi.org/project/dateparser/): date parsing library designed to parse dates from HTML pages
- [`workalendar`](https://pypi.org/project/workalendar/): worldwide holidays and working days helper and toolkit
- [`convertdate`](https://pypi.org/project/convertdate/): converts between Gregorian dates and other calendar systems