Term Dates Calculator: calculate term dates for students and teachers. Clear steps and worked examples.
Calendar days between two dates: (End date − Start date) in milliseconds ÷ 86,400,000. This handles leap years and month-length variations automatically when using correct date objects.
Age in years: floor(days elapsed ÷ 365.25). More precisely: count complete birthday anniversaries from birth to reference date, adjusted for whether the current year's birthday has occurred yet.
Adding months: adding "1 month" to 31 January produces the last valid day of February (28th or 29th), not 31 February — date libraries handle this edge case; manual arithmetic must do so explicitly.
Leap year rule: a year is a leap year if divisible by 4, except century years, unless also divisible by 400. So 2000 was a leap year; 1900 was not; 2100 will not be.