PyTimeNSW is a fork of PyTime with additional days added for NSW public holidays.
Installation
pip install pytimeNSW
To Do List
Add family_day public holiday for Canberra
Add is_public_can and public_holidays_can functions for Canberra
Add is_weekend function takes string or datimeTime and returns Boolean
Add ‘Monday rollover’ for public holidays that land on a weekend
Add days_until that accepts public holiday name as argument and returns int
Change is_public to work for python2 list comprehensions ## Basic Usage
>>>from pytimeNSW import pytimeNSW
>>>
>>>queen = pytimeNSW.queen() # Queen's Birthday
>>>print(queen)
datetime.date(2017, 6, 12)
>>>
>>>pytimeNSW.public(easter) # Easter Public Holidays
[datetime.date(2017, 3, 30),
datetime.date(2017, 3, 31),
datetime.date(2017, 4, 1),
datetime.date(2017, 4, 2)]
>>>
>>> labour = pytimeNSW.labour(2019) # 2019 Labour Day
>>>print(labour)
datetime.date(2019, 10, 7)
Other public holidays
>>>pytimeNSW.boxing() # Boxing Day
datetime.date(2015, 12, 26)
>>>
>>>pytimekr.anzac() # Anzac Day
datetime.date(2017, 4, 25)
>>>
>>>pytimeNSW.australia() # Australia Day
datetime.date(2017, 1, 26)
>>>pytimeNSW.public_holidays(1995) # List of public holidays in given year
[datetime.date(1995, 4, 25),
datetime.date(1995, 1, 26),
datetime.date(1995, 4, 14),
datetime.date(1995, 4, 15),
datetime.date(1995, 4, 16),
datetime.date(1995, 4, 17),
datetime.date(1995, 1, 1),
datetime.date(1995, 12, 25),
datetime.date(1995, 12, 26),
datetime.date(1995, 6, 12),
datetime.date(1995, 10, 2)]
>>>pytimeNSW.ispublic('April 25 2015') # Verifies if a date is a public holiday
True
License
MIT
Metadata
Release files for pytimeNSW 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pytimeNSW-0.2.2.tar.gz | 7.6 kB | Without provenance | Details |
Release files / pytimeNSW-0.2.2.tar.gz
| Download URL | pytimeNSW-0.2.2.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05b78fbb5633bedf9361aea440ccedcb4dc202a81d0a3e7f2346096a794cd955
|
|
BLAKE2b-256 checksum How to use checksums |
6179f7c22df3b09e41d7909c895c3cf712cad206f134bc08f1738b16b2d450b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pytimeNSW 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.