A simple command-line calendar tool written in C++, supporting multiple months, colored weekends, and flexible date inputs.
🔗 GitHub Repository: iaseth/calendar-cpp
✅ 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
git clone https://github.com/iaseth/calendar-cpp.git
cd calendar-cpp
mkdir build && cd build
cmake ..
make
The compiled executable will be cal
inside the build/
directory.
./cal
./cal --month 5 # May of the current year
./cal -m October # October of the current year
./cal -m Jan # January of the current year
./cal --year 2024
./cal -y 2023
./cal -m 10 -y 2023 -n 5
🔹 Prints: October 2023 → February 2024.
./cal --help
- 🔴 Sundays are printed in red
- 🟠 Saturdays are printed in orange
🖥️ Note: Colors work in most modern terminals.
To modify the source, edit:
src/calendar.cpp
Then rebuild:
cd build
make
This project is open-source under the MIT License.
Feel free to contribute! 🚀