Skip to main content

PyTime fork for NSW, Australia

Project description

PyTimeNSW is a fork of PyTime with additional days added for NSW public holidays.

Installation

pip install pytimeNSW

To Do List

  1. Add family_day public holiday for Canberra

  2. Add is_public_can and public_holidays_can functions for Canberra

  3. Add is_weekend function takes string or datimeTime and returns Boolean

  4. Add ‘Monday rollover’ for public holidays that land on a weekend

  5. Add days_until that accepts public holiday name as argument and returns int

  6. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytimeNSW-0.2.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

pytimeNSW-0.2.0-py2.py3-none-any.whl (9.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pytimeNSW-0.2.0.tar.gz.

File metadata

  • Download URL: pytimeNSW-0.2.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pytimeNSW-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4388da25c310fae451231ea5c962a29038cff821bd18e260bdfb0779aa419037
MD5 e249cf916356c95aea76db3f290adfc7
BLAKE2b-256 ed814cd1ecd6cd1ff3bd4d4b653ee348738c072960020f495d1f7476df0437a7

See more details on using hashes here.

File details

Details for the file pytimeNSW-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pytimeNSW-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 65b88412b0de0b42b18978201d1deb8b1632ed8cb0d9bb34ff7095e068f75741
MD5 2ec43e9fd1d4dde35d5c607d691506a2
BLAKE2b-256 eef2ae1367fbb4b6c421e2a1f34329bfe812a100e20ba40486aabd0981e93afe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page