{
  "id": "days-until-spring",
  "version": "9f814771cc56",
  "status": "published",
  "name": "Days Until Spring",
  "question": "Days until spring",
  "summary": "Counts the days from today, or any date you choose, to the next first day of spring, with its date and day of the week.",
  "category": "days",
  "subcategory": "countdowns",
  "url": "https://www.acalculator.org/days/days-until-spring",
  "markdown": "https://www.acalculator.org/days/days-until-spring.md",
  "kind": "function",
  "method": "Find the first date of the first day of spring on or after the start date, then count the days from the start date to it.",
  "assumptions": [
    "Spring starts at the March equinox (March 19 or 20 in US Eastern Time), when the Sun crosses the equator going north.",
    "Start dates from January 1, 2007 to December 31, 2060 work, because the dates are checked against the US Naval Observatory for these years, and US daylight time has started in March since 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 Spring",
      "description": "Whole days from the start date to the next first day of spring; 0 on the day itself.",
      "format": "integer"
    },
    "date": {
      "label": "Date",
      "description": "The next date of the first day of spring 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"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "from": "2026-09-29"
    },
    "outputs": {
      "days": 172,
      "date": "2027-03-20",
      "weekday": "Saturday",
      "weeks": "24 weeks and 4 days"
    },
    "text": "From September 29, 2026, there are 172 days until the first day of spring on Saturday, March 20, 2027."
  },
  "examples": [
    {
      "given": {
        "from": "2026-01-01"
      },
      "expect": {
        "date": "2026-03-20",
        "days": 78
      },
      "source": "US Naval Observatory seasons API (https://aa.usno.navy.mil/api/seasons), converted to US Eastern Time; Meeus, Astronomical Algorithms, ch. 27"
    },
    {
      "given": {
        "from": "2026-03-21"
      },
      "expect": {
        "date": "2027-03-20",
        "days": 364
      },
      "source": "US Naval Observatory seasons API (https://aa.usno.navy.mil/api/seasons), converted to US Eastern Time; Meeus, Astronomical Algorithms, ch. 27"
    }
  ],
  "sources": [
    "US Naval Observatory seasons API (https://aa.usno.navy.mil/api/seasons), converted to US Eastern Time; Meeus, Astronomical Algorithms, ch. 27"
  ],
  "related": [
    "days-until-april-fools-day",
    "days-until-easter",
    "days-until-earth-day",
    "days-until-cinco-de-mayo",
    "days-until-mothers-day",
    "days-between-dates"
  ],
  "changelog": []
}
