Skip to main content

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

Metadata

Release files for agecheck 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agecheck 0.1.0
File Size Uploaded
agecheck-0.1.0.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agecheck 0.1.0
File Interpreter ABI Platform
agecheck-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.3 kB

Release files / agecheck-0.1.0.tar.gz

Download URL agecheck-0.1.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3d1cc2cf83e6b89938dfb43015e659bb5420daa4de117c316de05a4426081ec7
BLAKE2b-256 checksum
How to use checksums
0883ea5bec4cff91109b410f24e5053cda13b7addd8ebfc07d3c859ab1a76cc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / agecheck-0.1.0-py3-none-any.whl

Download URL agecheck-0.1.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f866beced4db69f3bcbc22bfcc37dd72a416d72d0907a33e408f530e6ddb62d5
BLAKE2b-256 checksum
How to use checksums
c0712a38de531875cda4316383c3f65cb190bf13f9a72928b089634952322230
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page