Skip to content

iaseth/calendar-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📆 Calendar CLI (C++)

A simple command-line calendar tool written in C++, supporting multiple months, colored weekends, and flexible date inputs.

🔗 GitHub Repository: iaseth/calendar-cpp


🚀 Features

✅ Print the calendar for any month and year
✅ Accepts month as number or name (full/partial)
✅ Print multiple months using -n (e.g., next 3 months)
Sundays in red and Saturdays in orange
Fully customizable and cross-platform


📥 Installation

🔹 Clone the Repository

git clone https://github.com/iaseth/calendar-cpp.git
cd calendar-cpp

🔹 Build Using CMake

mkdir build && cd build
cmake ..
make

The compiled executable will be cal inside the build/ directory.


📌 Usage

🔹 Print Current Month

./cal

🔹 Print a Specific Month

./cal --month 5        # May of the current year
./cal -m October       # October of the current year
./cal -m Jan           # January of the current year

🔹 Print a Specific Year

./cal --year 2024
./cal -y 2023

🔹 Print Multiple Months (-n)

./cal -m 10 -y 2023 -n 5

🔹 Prints: October 2023 → February 2024.

🔹 Display Help

./cal --help

🎨 Color Formatting

  • 🔴 Sundays are printed in red
  • 🟠 Saturdays are printed in orange

🖥️ Note: Colors work in most modern terminals.


🔧 Development

To modify the source, edit:

src/calendar.cpp

Then rebuild:

cd build
make

📜 License

This project is open-source under the MIT License.

Feel free to contribute! 🚀

About

Command-line calendar tool written in C++

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published