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 hashes)

Uploaded Source

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