Skip to main content

Calculates birth information based on a specific Date of Birth.

Project description


Calculates birth information based on a specific Date of Birth.


pip install agecalc

What’s Inside



This stores the DOB data into a class. You can then use the methods below to get data from this.



Displays a DOB’s age.


Displays a DOB’s age in months.


Displays a DOB’s age in years/months. Will return a dictionary with the “years” and “months” keys, and their values.


Displays the socially acceptable dating ages for a person. Will return a dictionary with the “max”, “min” and “original” keys, with their values.


Displays the DAY of birth of a DOB.


Displays days a DOB’s been alive for


Displays the days since a DOB’s last birthday


Displays the days until a DOB’s next birthday

Example (age function)

With AgeCalc class

import agecalc
dob = agecalc.AgeCalc(1, 1, 2000)
print dob.age

With Functions

import agecalc
print agecalc.age(1, 1, 2000)


All functions/classes take only these three arguments:

dd: Day

mm: Month

yy: Year

Dates should be passed as if they were integers. If the Date/Month contains a “0” before the integer, the “0” should be ommitted.

E.G. DOB “01/01/2000” should be passed as:

dd: 1

mm: 1

yy: 2000

Submitting an Issue

If you wish to submit an issue with this module, or suggest any changes, you can either use the GitHub Issue Tracker, or email me at

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 (2.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page