Skip to main content

Age Calculator CLI Tool

Project description

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.

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

how_old-0.0.4.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

how_old-0.0.4-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file how_old-0.0.4.tar.gz.

File metadata

  • Download URL: how_old-0.0.4.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for how_old-0.0.4.tar.gz
Algorithm Hash digest
SHA256 5612ebef3e1de1e76566bba6f80fc584db8775fb2cc8f77ea73c54fcf21ca9c4
MD5 e767dc60e37f5a3cf4208bb47c8194a0
BLAKE2b-256 fc2db3239ada3ada58138114ba57d6d42e34f82611ae38431e3af3d302b294bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for how_old-0.0.4.tar.gz:

Publisher: release.yaml on jean2262/how_old

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file how_old-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: how_old-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for how_old-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 44eab08034b1420693eba4631b999f1725fcb448fed6c9b99d6f0dc156b32be4
MD5 253f59977cd7fd9c4f1d4ed1753cafc5
BLAKE2b-256 52374bf1d03b5cf5421bd7922bc1b9d38b1a40bb984d90bceb4f430fdbb42f97

See more details on using hashes here.

Provenance

The following attestation bundles were made for how_old-0.0.4-py3-none-any.whl:

Publisher: release.yaml on jean2262/how_old

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page