Skip to main content

Python library for representing specific months

Project description

https://img.shields.io/travis/kstark/months.svg https://img.shields.io/pypi/v/months.svg Documentation Status

Python library for representing specific months

Features

  • Represent specific months along with their years

  • Convert to and from native datetime and date objects

  • Convenient math operations for adding / subtracting month intervals

  • Convenient operations for displaying months

History

2.0.0 (2019-10-18)

  • Thanks to nolanbconaway for their contributions!

  • New methods to handle relations between months:
    • month.to(other) for generating intervals of months.

    • month.distance(other) for computing distance between months.

  • New methods for month date info
    • month.n_days to return the number of days in the month.

    • month.dates to return a list of all days in the month.

    • month.nth(day) to return a specific day in the month.

  • __int__ and __float__ methods added.
    • Also a month.gregorian_month_number method to compute number of months since year 0.

1.1.0 (2019-10-18)

  • Support up to Python 3.8, drop explicit support for 2.6/3.2/3.3

  • Raise TypeError on invalid addition/subtraction instead of ValueError

1.0.0 (2015-04-13)

  • Documentation added

  • 2.6 support added

  • Tests for bad math added

0.1.0 (2015-04-13)

  • First release on PyPI.

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

months-2.0.0.tar.gz (15.7 kB view details)

Uploaded Source

File details

Details for the file months-2.0.0.tar.gz.

File metadata

  • Download URL: months-2.0.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

File hashes

Hashes for months-2.0.0.tar.gz
Algorithm Hash digest
SHA256 035c7f92c5a64d575b321df7c0f5647aca9d7bd97188971ae70fc9b4e50715b1
MD5 68e72040fb575780bb96193706930cde
BLAKE2b-256 9e89ecc190bfff05b4a3ae12bacfc0ed2b90c6fe17486d4af05b2964eceefd74

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