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.3.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.3-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: how_old-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 9ff621cfcb971378886d5267030f7f427f008e374b42eba145ab3db49b2c7d18
MD5 4f0f1312b3ca0c664145981578db763b
BLAKE2b-256 be89434f2088309bf2726b7801274b30049bb10c7c48e0b39c2a1455bd9dc834

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: how_old-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c67bfcde83bb1af027808fef3f725fed62e8790e90feebb4db42f74cd4d1d5fb
MD5 fc6b5f30d145cb07a3e32f49b45fe660
BLAKE2b-256 29f7af31213b8b4f98a8186558d714f625d7ec3fc613d6b764c428b99e907308

See more details on using hashes here.

Provenance

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