Skip to main content

Age Calculator CLI Tool 🕰️

This simple Python script calculates your age based on your date of birth. It supports command-line inputs for the year, month, and day of birth. Great for learning Python, understanding date handling, or building small CLI tools!

Features

  • 🗓️ Accepts year, month, and day of birth as inputs.
  • 🚀 Command-line interface (CLI) for easy usage.
  • ⚡ Calculates your precise age based on today's date.
  • 🛡️ Handles invalid dates with clear error messages.

Usage

1. Clone the Repository

git clone https://github.com/your-username/age-calculator.git
cd age-calculator

2. Run the Script

Use the following command to calculate your age:

python age_calculator.py --year 1990 --month 12 --day 15

3. Example Output

You are 33 years old.

Command-Line Arguments

--year (required): Year of birth (e.g., 1990).
--month (optional): Month of birth (1-12, default: 1).
--day (optional): Day of birth (1-31, default: 1).

Requirements

Python 3.6 or higher

License

This project is licensed under the MIT License. See the LICENSE file for details.

Release files for how-old 0.0.4

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

Source distribution (sdist)

Source distribution for how-old 0.0.4
File Size Uploaded
how_old-0.0.4.tar.gz 2.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for how-old 0.0.4
File Interpreter ABI Platform
how_old-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 4.5 kB

Release files / how_old-0.0.4.tar.gz

Download URL how_old-0.0.4.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5612ebef3e1de1e76566bba6f80fc584db8775fb2cc8f77ea73c54fcf21ca9c4
BLAKE2b-256 checksum
How to use checksums
fc2db3239ada3ada58138114ba57d6d42e34f82611ae38431e3af3d302b294bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 12, 2024.

Transparency log

Release files / how_old-0.0.4-py3-none-any.whl

Download URL how_old-0.0.4-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
44eab08034b1420693eba4631b999f1725fcb448fed6c9b99d6f0dc156b32be4
BLAKE2b-256 checksum
How to use checksums
52374bf1d03b5cf5421bd7922bc1b9d38b1a40bb984d90bceb4f430fdbb42f97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 12, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

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