{
  "id": "days-until-daylight-saving-time",
  "version": "e4a3dc7a3d85",
  "status": "published",
  "name": "Days Until Daylight Saving Time",
  "question": "Days until daylight saving time",
  "summary": "Counts the days from today, or any date you choose, to the next daylight saving time change, with its date and day of the week.",
  "category": "days",
  "subcategory": "countdowns",
  "url": "https://www.acalculator.org/days/days-until-daylight-saving-time",
  "markdown": "https://www.acalculator.org/days/days-until-daylight-saving-time.md",
  "kind": "function",
  "method": "Find the first date of the daylight saving time change on or after the start date, then count the days from the start date to it.",
  "assumptions": [
    "Since 2007, US clocks go forward one hour at 2:00 a.m. on the second Sunday of March (daylight saving time starts) and back one hour at 2:00 a.m. on the first Sunday of November (it ends). The dates come from your browser’s time zone data for New York.",
    "Hawaii and most of Arizona stay on standard time all year.",
    "Start dates from January 1, 1970 to December 31, 2400 work, because the time zone data holds every US clock change since 1970 (the March and November rule applies from 2007).",
    "The start date itself is not counted: from the day before, the count is 1; on the day itself, it is 0.",
    "Dates are calendar days with no time of day, so a time zone or a daylight-saving change never adds or loses a day."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "from": {
        "title": "Count from",
        "description": "The date to count from. Today, unless you change it.",
        "type": "string",
        "format": "date"
      }
    }
  },
  "outputs": {
    "days": {
      "label": "Days until Daylight Saving Time",
      "description": "Whole days from the start date to the next daylight saving time change; 0 on the day itself.",
      "format": "integer"
    },
    "date": {
      "label": "Date",
      "description": "The next date of the daylight saving time change on or after the start date.",
      "format": "date-long"
    },
    "weekday": {
      "label": "Day of the week",
      "description": "The weekday of that date.",
      "format": "text"
    },
    "weeks": {
      "label": "In weeks",
      "description": "The same number of days in weeks and days.",
      "format": "text"
    },
    "detail": {
      "label": "Clocks",
      "description": "Which way the clocks go on that date.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "from": "2026-09-30"
    },
    "outputs": {
      "days": 32,
      "date": "2026-11-01",
      "weekday": "Sunday",
      "weeks": "4 weeks and 4 days",
      "detail": "Back one hour: daylight saving time ends"
    },
    "text": "From September 30, 2026, there are 32 days until the daylight saving time change on Sunday, November 1, 2026."
  },
  "examples": [
    {
      "given": {
        "from": "2026-01-01"
      },
      "expect": {
        "date": "2026-03-08",
        "days": 66
      },
      "source": "15 U.S.C. 260a, as amended in 2005; IANA time zone database, America/New_York"
    },
    {
      "given": {
        "from": "2026-03-09"
      },
      "expect": {
        "date": "2026-11-01",
        "days": 237
      },
      "source": "15 U.S.C. 260a, as amended in 2005; IANA time zone database, America/New_York"
    },
    {
      "given": {
        "from": "2026-11-01"
      },
      "expect": {
        "date": "2026-11-01",
        "days": 0
      },
      "source": "15 U.S.C. 260a, as amended in 2005; IANA time zone database, America/New_York"
    },
    {
      "given": {
        "from": "2026-11-02"
      },
      "expect": {
        "date": "2027-03-14",
        "days": 132
      },
      "source": "15 U.S.C. 260a, as amended in 2005; IANA time zone database, America/New_York"
    }
  ],
  "sources": [
    "15 U.S.C. 260a, as amended in 2005; IANA time zone database, America/New_York"
  ],
  "related": [
    "days-until-st-patricks-day",
    "days-until-spring",
    "days-until-eid",
    "days-until-april-fools-day",
    "days-until-easter",
    "days-until",
    "days-between-dates"
  ],
  "changelog": []
}
