Method Deck / timezones

US daylight saving time in effect?

Determines whether a given date falls within US daylight saving time under the federal rule, and reports that year's transition dates.

Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.

Try it

Inputs

Outputs

Steps

  1. Parse the date as a proleptic Gregorian civil date.
  2. Find the second Sunday of March and the first Sunday of November of the same year, using ISO weekday parity from the day-number kernel (Hinnant days_from_civil, cited above).
  3. DST is in effect for dates on or after the second Sunday of March and before the first Sunday of November.
  4. This method takes a date only (no time of day): the Act's transitions occur at 2:00 a.m. local time, so this method treats the start date itself as already in DST and the end date itself as already back to standard time.

Constants

Sources

Worked example and test vectors

NameInputsAnswer
worked example{"date":"2026-07-04"}yes (DST 2026: 2026-03-08 to 2026-11-01)
test vector: before DST starts{"date":"2026-01-15"}no (DST 2026: 2026-03-08 to 2026-11-01)
test vector: on the end transition date{"date":"2026-11-01"}no (DST 2026: 2026-03-08 to 2026-11-01)

Published card