Skip to content

jean2262/how_old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Age Calculator CLI Tool 🕰️

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages