Back to Home11/17/2025, 9:21:29 AM

Show HN: I'm created simple CLI-calendar without time.h

1 points
0 comments

Mood

supportive

Sentiment

positive

Category

tech

Key topics

CLI

C programming

calendar application

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

The author shares a simple CLI calendar application written in C without using time.h, featuring navigation and date highlighting, and provides a GitHub link for the code.

Snapshot generated from the HN discussion

Discussion Activity

No activity data yet

We're still syncing comments from Hacker News.

Generating AI Summary...

Analyzing up to 500 comments to identify key contributors and discussion patterns

Discussion (0 comments)

Discussion hasn't started yet.

ID: 45952069Type: storyLast synced: 11/17/2025, 9:22:03 AM

Want the full context?

Jump to the original sources

Read the primary article or dive into the live Hacker News thread when you're ready.