Current collected state Current
Observed since 20 Oct, 21:22 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
agecheck
Date-of-birth / age-threshold utility with timezone-correct date math.
Date-of-birth / age-threshold utility with timezone-correct date math. Answer whether someone meets a jurisdiction minimum age using the calendar date in that jurisdiction's timezone.
pip install agecheck
from datetime import date
from agecheck import is_of_age, age_on
dob = date(2000, 6, 15)
assert is_of_age(dob, 18, on=date(2018, 6, 15), tz="UTC") is True
assert is_of_age(dob, 18, on=date(2018, 6, 14), tz="UTC") is False
assert age_on(dob, on=date(2026, 6, 15), tz="UTC") == 26
This is an early 0.1.0 release with active development planned:
Coldbricks — coldbricks@gmail.com
Download counts and popularity will appear here as the collector receives them.
Declarations describe requirements; they are not a resolved dependency graph.
bdist_wheel · 3.89 KB · Python py3
sdist · 3.26 KB · Python source
Observed since 20 Oct, 21:22 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:8fe12ec662f10a809660b40ccab43bff9a3dc8528c19f9d67b8fccf6a4c7946e