{
  "id": "days-until-february-29",
  "version": "bd92b62940a7",
  "status": "published",
  "name": "Days Until February 29",
  "question": "Days until February 29",
  "summary": "Counts the days from today, or any date you choose, to the next February 29, with its day of the week.",
  "category": "days",
  "subcategory": "countdowns",
  "url": "https://www.acalculator.org/days/days-until-february-29",
  "markdown": "https://www.acalculator.org/days/days-until-february-29.md",
  "kind": "function",
  "method": "Find the first February 29 on or after the start date, then count the days from the start date to it.",
  "assumptions": [
    "February 29 comes only in leap years: years divisible by 4, except century years not divisible by 400 (Gregorian calendar). So 2100 has no February 29, and the count from March 1, 2096 runs to February 29, 2104.",
    "The start date itself is not counted: from the day before February 29, the count is 1; on February 29 itself, it is 0.",
    "Start dates from January 1, 1900 to December 31, 2400 work for the count to February 29, the range the date field accepts.",
    "Today is the date on your own device, so the count to February 29 changes at midnight where you are. Dates are whole calendar days, so 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 February 29",
      "description": "Whole days from the start date to the next February 29; 0 on the day itself.",
      "format": "integer"
    },
    "date": {
      "label": "Date",
      "description": "The next February 29 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-30"
    },
    "outputs": {
      "days": 517,
      "date": "2028-02-29",
      "weekday": "Tuesday",
      "weeks": "73 weeks and 6 days"
    },
    "text": "From September 30, 2026, there are 517 days until February 29 on Tuesday, February 29, 2028."
  },
  "examples": [
    {
      "given": {
        "from": "2028-02-29"
      },
      "expect": {
        "date": "2028-02-29",
        "days": 0
      },
      "source": "U.S. Naval Observatory, Leap Years: the Gregorian leap year rule (https://aa.usno.navy.mil/faq/leap_years); Python 3 datetime (docs/progress/WP-44/truth.py)"
    },
    {
      "given": {
        "from": "2028-01-01"
      },
      "expect": {
        "date": "2028-02-29",
        "days": 59
      },
      "source": "U.S. Naval Observatory, Leap Years: the Gregorian leap year rule (https://aa.usno.navy.mil/faq/leap_years); Python 3 datetime (docs/progress/WP-44/truth.py)"
    },
    {
      "given": {
        "from": "2028-03-01"
      },
      "expect": {
        "date": "2032-02-29",
        "days": 1460
      },
      "source": "U.S. Naval Observatory, Leap Years: the Gregorian leap year rule (https://aa.usno.navy.mil/faq/leap_years); Python 3 datetime (docs/progress/WP-44/truth.py)"
    }
  ],
  "sources": [
    "5 U.S.C. 6103 (federal holidays; weekend rule in 6103(b) and Executive Order 11582). Checked against OPM holiday schedules.",
    "Equinoxes and solstices: Jean Meeus, Astronomical Algorithms (2nd ed., 1998), chapter 27, checked against the US Naval Observatory."
  ],
  "related": [
    "days-until-february-28",
    "days-until-march-1",
    "days-until-february-1",
    "days-until-february-2",
    "days-until-february-3",
    "days-until-february-4",
    "days-until-february-5",
    "days-until-february-6",
    "days-until-february-7",
    "days-until-february-8",
    "days-until-february-9",
    "days-until-february-10",
    "days-until-february-11",
    "days-until-february-12",
    "days-until-february-13",
    "days-until-february-14",
    "days-until-february-15",
    "days-until-february-16",
    "days-until-february-17",
    "days-until-february-18",
    "days-until-february-19",
    "days-until-february-20",
    "days-until-february-21",
    "days-until-february-22",
    "days-until-february-23",
    "days-until-february-24",
    "days-until-february-25",
    "days-until-february-26",
    "days-until-february-27",
    "days-between-dates"
  ],
  "changelog": []
}
