Date and Time Calculations — Methods and Accuracy
Review the data sources, calculation rules, and accuracy limits for live clocks, date calculators, time zone conversions, and calendar references.
Live clocks and device accuracy
Live clocks use your device’s system time. They update once a second while the page is active and recalculate from the current device time after a delayed update. We do not contact a time server, measure your clock’s error, or claim atomic-clock precision. Enable automatic time synchronization on your device if you need to correct its clock.
Time zones and seasonal changes
Regional clock readings use the browser’s internationalization API and its installed time-zone data. The IANA Time Zone Database records regional offset and daylight-saving rules, including changes made by governments. Your browser may receive those updates later than IANA publishes them. For an appointment, convert the event’s date rather than reusing today’s offset.
Calendar dates and month arithmetic
Date-only tools use the Gregorian calendar, extended backward mathematically rather than reproducing each country’s historical adoption. Differences in calendar days compare date components without counting local daylight-saving hours. Adding months or years preserves the day where possible and otherwise uses the final day of the target month: January 31 plus one month becomes February 28 in a common year.
Calendar differences count completed months with that same month-end rule, split them into years and months, then count the remaining days. February 29 birthdays are treated as February 28 in non-leap years for this calculation. This is a stated calculator convention, not a determination of legal eligibility.
Weeks, ordinal dates, and leap years
ISO weeks begin on Monday; week one contains January 4, equivalently the first Thursday. We report the ISO week-year where it differs from the calendar year. The US-style week reference here starts weeks on Sunday and calls the week containing January 1 week one; other systems can use different rules. Ordinal dates start at 001 on January 1. Leap years are divisible by four, except century years that are not divisible by 400.
Working days and holidays
The working-day counter excludes the start date and includes the end date if it qualifies. Weekends mean Saturday and Sunday. The optional holiday setting excludes observed US federal holidays, including an observed New Year’s Day that falls in the preceding December. State holidays, local closures, market calendars, and employer policies are not included. The US Office of Personnel Management publishes the federal schedule and observance rules.
Unix timestamps and ISO strings
Unix values count seconds since 1970-01-01T00:00:00Z; milliseconds are 1,000 times that value. JavaScript dates do not model leap seconds. UTC date-time strings end in Z, while local calendar dates preserve the date shown on your device. The RFC 3339 timestamp specification explains the date-time and numeric-offset convention used in internet protocols.
Julian dates and moon estimates
Ordinal production codes are distinct from astronomical Julian dates. Our astronomical value is the Unix millisecond count divided by 86,400,000 plus 2,440,587.5. The displayed civil-date day number is floor(JD + 0.5). See the US Naval Observatory converter for a reference calculation.
Moon estimates use a mean 29.53058770576-day cycle measured from January 6, 2000 at 18:14 UTC. Illumination is estimated from a cosine curve. This model does not calculate the Moon’s actual orbit, rise and set times, local viewing conditions, or exact event times. Use the US Naval Observatory phase tables for primary phase predictions.
The yearly calendars use a more precise method for new and full moons: the lunar-phase algorithm in Jean Meeus’s Astronomical Algorithms (chapter 49), with its periodic correction terms. Those dates agree with published UTC phase times to within a few minutes and are shown as UTC dates, so a phase late in the UTC day can fall on the previous evening in the Americas.
Sunrise, sunset, and day length
City pages calculate sun times from the city-centre coordinates with the standard sunrise equation: solar mean anomaly, equation of center, ecliptic longitude, and declination, with sunrise and sunset defined as the moment the sun’s upper edge is 0.833° below a flat horizon to allow for refraction. Results are usually within one or two minutes of almanac values. They do not account for elevation, hills, or buildings. Compare with the NOAA Solar Calculator for a reference value.
Clock-change dates
Daylight-saving dates on city, country, and time-zone pages are found by stepping through the year in the time-zone data bundled with the site build and narrowing each offset change to the minute. They reflect the IANA rules available when the page was built. When a government changes its rules, as British Columbia and Morocco did in 2026, we update the affected pages and cite the announcement.
Other calendar systems
The Hebrew, Islamic (Umm al-Qura), Persian, Chinese, Indian national, Ethiopian, Thai, and Japanese dates on the today page are converted by your browser using the Unicode CLDR calendar algorithms behind Intl.DateTimeFormat. Calculated calendars can differ by a day from dates set by moon sighting or by local religious authorities.
Holiday dates
Fixed-date holidays use their calendar date. Movable holidays use their published rule: for example, the fourth Thursday in November for US Thanksgiving and the Gregorian computus for Easter Sunday. Holidays tied to lunar or lunisolar calendars are converted with the same calendar data as the today page or taken from published tables, and the holiday page says which. Countdowns run to local midnight on the holiday in your own time zone.
Report a calculation error
Send a correction with the page, inputs, expected output, device time zone, and browser. That makes a calculation reproducible and helps distinguish a convention difference from a defect.