| ▲ | Show HN: I'm created simple CLI-calendar without time.h | |
| 2 points by DenisDolya 8 hours ago | ||
TERMINAL CALENDAR APPLICATION INTERACTIVE COMMAND-LINE CALENDAR WITH NAVIGATION KEY FEATURES: - Monthly calendar display with highlighted current date - Navigation between months and years - Return to current date functionality - Leap year calculation - Recursive printing functions - Automatic current date detection COMPILATION: gcc -o calendar calendar.c -Wall -O2 USAGE EXAMPLES: $ ./calendar Initial display shows current month with today's date highlighted in brackets NAVIGATION COMMANDS: n - Next month p - Previous month t - Today (return to current date) q - Quit application DISPLAY FEATURES: - Month name and year in header with star borders - Day names (Su Mo Tu We Th Fr Sa) - Dates formatted in grid layout - Current date highlighted as [dd] - Automatic week wrapping DATE HIGHLIGHTING: The current system date is automatically detected and highlighted using bracket notation: [15] for the 15th of current month YEAR HANDLING: - Automatic leap year calculation for February - Smooth year transitions when navigating between December and January - Supports years based on system date capabilities KEY FUNCTIONS: leap_year() - Determines if current year is leap year get_days() - Returns number of days in current month first_day() - Calculates day of week for 1st of month print_days() - Recursively prints calendar days with highlighting GitHub: https://github.com/DenisDolya/cli-arsenal/tree/main/calendar | ||