Skip to main content

Date without year

Project description

PyPI Read the Docs Build Status Coverage Status

This package provides the MonthDay value type for dealing dates without year. It is useful for dealing with birthdays, or anniversaries. Works on Python 2.6, 2.7, 3.2–3.5, PyPy, PyPy3.

>>> from monthday import *
>>> aug_4 = MonthDay(8, 4)
>>> aug_4
monthday.MonthDay(8, 4)
>>> aug_4.date(1988)
datetime.date(1988, 8, 4)
>>> list(aug_4.dates(range(2013, 2016)))
[datetime.date(2013, 8, 4),
 datetime.date(2014, 8, 4),
 datetime.date(2015, 8, 4)]
>>> from datetime import date
>>> MonthDay.from_date(date(2015, 12, 25))
monthday.MonthDay(12, 25)

It’s available on PyPI:

$ pip install monthday

Written by Hong Minhee, and distributed under LGPLv3 or later. Find the source code from the GitHub repository.

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

monthday-0.9.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

monthday-0.9.0-py2.py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 2 Python 3

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