A simple function to check if a given date a public holiday in Australia
Project description
# OZ Holiday
A simple function to check a given date a public holiday or not in Australia, really easy to use.
- Use the data from [data.gov.au](https://data.gov.au/dataset/australian-holidays-machine-readable-dataset)
- Only use Python standard libraries
- Only one function - keep it simple
## Installation
```bash
pip install ozholiday
```
Or
```bash
git clone https://github.com/zhongdai/ozholiday.git
cd ozholiday
python setup.py install
```
## Usage
```python
In [1]: from ozholiday import isholiday
In [2]: isholiday('20170101')
Out[2]: True
In [3]: isholiday('20170101',detail=True)
Out[3]:
{'Applicable To': 'NAT',
'Date': '20170101',
'Holiday Name': "New Year's Day",
'Information': "New Year's Day is the first day of the calendar year and is celebrated each January 1st",
'More Information': '',
'_id': 1}
In [5]: isholiday('20170103')
Out[5]: False
In [9]: isholiday('20190102')
ValueError: The date 20190102 is not in current list published by data.gov.au,
Check here https://data.gov.au/dataset/australian-holidays-machine-readable-dataset
```
=======
History
=======
0.1.0 (2018-03-02)
------------------
* First release on PyPI.
A simple function to check a given date a public holiday or not in Australia, really easy to use.
- Use the data from [data.gov.au](https://data.gov.au/dataset/australian-holidays-machine-readable-dataset)
- Only use Python standard libraries
- Only one function - keep it simple
## Installation
```bash
pip install ozholiday
```
Or
```bash
git clone https://github.com/zhongdai/ozholiday.git
cd ozholiday
python setup.py install
```
## Usage
```python
In [1]: from ozholiday import isholiday
In [2]: isholiday('20170101')
Out[2]: True
In [3]: isholiday('20170101',detail=True)
Out[3]:
{'Applicable To': 'NAT',
'Date': '20170101',
'Holiday Name': "New Year's Day",
'Information': "New Year's Day is the first day of the calendar year and is celebrated each January 1st",
'More Information': '',
'_id': 1}
In [5]: isholiday('20170103')
Out[5]: False
In [9]: isholiday('20190102')
ValueError: The date 20190102 is not in current list published by data.gov.au,
Check here https://data.gov.au/dataset/australian-holidays-machine-readable-dataset
```
=======
History
=======
0.1.0 (2018-03-02)
------------------
* First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ozholiday-0.1.0.tar.gz
(8.7 kB
view hashes)
Built Distributions
ozholiday-0.1.0-py3.6.egg
(4.6 kB
view hashes)
Close
Hashes for ozholiday-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fe314701941f416264716e13be4b41a0c8cb358efc0bde5ebc5df81f0714c01 |
|
MD5 | ee4a0f4e536fdb9ddf0cd66eb5832c66 |
|
BLAKE2b-256 | 8e1aafda53fd5cdc9733585dd8832c14be6ec1f3a804c4544fdead18053b4179 |