Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.13 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.13 KB

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.