agecheck
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.
Install
pip install agecheck
Usage
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
Roadmap
This is an early 0.1.0 release with active development planned:
- Jurisdiction preset table (US states, EU defaults)
- Optional document-level verification helpers
- Stricter input parsing modes
Author
Coldbricks — coldbricks@gmail.com
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
agecheck-0.1.0.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agecheck-0.1.0.tar.gz.
File metadata
- Download URL: agecheck-0.1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d1cc2cf83e6b89938dfb43015e659bb5420daa4de117c316de05a4426081ec7
|
|
| MD5 |
7f6fbf78932758681be3e85d222793a7
|
|
| BLAKE2b-256 |
0883ea5bec4cff91109b410f24e5053cda13b7addd8ebfc07d3c859ab1a76cc5
|
File details
Details for the file agecheck-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agecheck-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f866beced4db69f3bcbc22bfcc37dd72a416d72d0907a33e408f530e6ddb62d5
|
|
| MD5 |
f72cb86f9b611426eeb6942bd7d56633
|
|
| BLAKE2b-256 |
c0712a38de531875cda4316383c3f65cb190bf13f9a72928b089634952322230
|