👉 Calendars are based on complex mathematical systems that synchronize timekeeping with astronomical cycles, ensuring alignment with the Earth's rotation and orbit around the Sun. The Gregorian calendar, widely used today, is a solar calendar with 365 days in a year, divided into 12 months of varying lengths to approximate the solar year (approximately 365.2425 days). Each month has a maximum of 28 or 29 days, with leap years added every four years to account for the extra fraction of a day, making the average year slightly longer than 365 days. This intricate system relies on modular arithmetic and time division to maintain calendar accuracy, ensuring seasons align with the calendar year. Additionally, lunisolar calendars (like the Hebrew or Chinese) incorporate lunar cycles, using intercalary months to keep lunar months aligned with solar seasons, requiring precise calculations of lunar phases and their relation to solar years. These mathematical frameworks balance practical timekeeping with astronomical precision, adapting to both human needs and celestial rhythms.