iranholidays

provides functions to tell if a date is a holiday in Iran or not


License
GPL-3.0
Install
pip install iranholidays==0.2.3

Documentation

iranholidays is a small python library that provides functions to check if a date is a holiday in Iran or not.

Warning: For Islamic holidays, like Eid al-Fitr, the calculation may be off by a day or two since those events depend on seeing the moon by naked eye and cannot be predicted by computers.

Usage

In case you have a date object from the following libraries, you can check it directly using one of the off_occasion_* functions:

off_occasion function checks if a date is a weekend or holiday and returns the occasion string or None. The default value for weekend parameter is (4,) which means Friday. Either pass a different value to weekend parameter to override it or use set_default_weekend function to change this default for all functions: