A console calendar written in C with a TUI menu.
No external dependencies — uses only ANSI escape sequences and raw terminal mode.
![]() |
![]() |
- Year selection from 1899 to 2099
- Toggle week start day (Sunday / Monday)
- Output to terminal or to
calendar.txt - Cross-platform: Linux, Windows (MinGW)
# Linux
make
./build/linux/calendar
# Windows (cross-compile from Linux)
make build_win64 # 64-bit
make build_win32 # 32-bit
# Windows (native MinGW)
mingw32-make build_win64Binaries are placed in build/<platform>/.
↑/↓ navigate menu
←/→ change value (year, week start, output)
Enter select / confirm
Esc exit
| File | Description |
|---|---|
main.c |
Entry point, menu setup, callbacks |
menu.c / menu.h |
TUI menu (raw terminal + ANSI) |
print_calendar.c / print_calendar.h |
Calendar generation and printing |
Makefile |
Build for Linux and Windows |
- Sakamoto's algorithm for January 1st day-of-week
- Gregorian calendar leap year rules
- Layout: 4 rows × 3 months

