Overview
The calendar utilities module provides functions and constants for working with the 2026 mood calendar. It includes date key generation, calendar data structures, and layout calculations for both standard and quadrimester views.Types
DateCell
Functions
getDateKey
year- The year (e.g., 2026)month- The month (1-12)day- The day of the month (1-31)
string - A formatted date key (e.g., “2026-3-15”)
Example:
getContrastColor
moodKey- The mood identifier
"black" for neutral moods, "white" for all others
Example:
generateCalendarData
startDay- Day of week the month starts on (0-6, Monday-Sunday)daysInMonth- Total days in the month (28-31)
DateCell[] - Array of date cell objects with position data
Example:
Constants
Day Labels
2026 Month Data
name- Full month name in uppercasedays- Number of days in the monthstartDay- Day of week (0-6) the month starts on
Quadrimesters
Layout Constants
Standard Calendar Layout
Quadrimester Layout
Font Sizes
SVG Layout
Complete Example
Here’s a complete month calendar implementation:Related
- Interactive Calendar - Uses calendar utilities for layout
- Mood Calendar Feature - User guide for the mood calendar