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.2.tar.gz (1.8 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.2-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: how_old-0.0.2.tar.gz
  • Upload date:
  • Size: 1.8 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.2.tar.gz
Algorithm Hash digest
SHA256 4a3bb75c0e05effdbeaa1831a9813e5e9cd9d1eaf08654fa5812fa032e5882b1
MD5 039524dc47bf1d0e5210f5e3685b0525
BLAKE2b-256 2163bb520530c0375d58d9ff6b5c551e1dd94d34c7085b74a829ec0464f0d199

See more details on using hashes here.

Provenance

The following attestation bundles were made for how_old-0.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: how_old-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4bf3baddf5bdb07f2886d6d228d8427ab80d2bcdef62a3bd1a07fba89ad47a45
MD5 e9c23abc5d527cd4b3508ba8f1ee630e
BLAKE2b-256 1d79cb7eff7f6b8e5b4629afc141ca97c669f802b9136fc93d70e69da5479beb

See more details on using hashes here.

Provenance

The following attestation bundles were made for how_old-0.0.2-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