{
  "id": "days-until-march-13",
  "version": "886267ae00d1",
  "status": "published",
  "name": "Days Until March 13",
  "question": "Days until March 13",
  "summary": "Counts the days from today, or any date you choose, to the next March 13, with its day of the week.",
  "category": "days",
  "subcategory": "countdowns",
  "url": "https://www.acalculator.org/days/days-until-march-13",
  "markdown": "https://www.acalculator.org/days/days-until-march-13.md",
  "kind": "function",
  "method": "Find the first March 13 on or after the start date, then count the days from the start date to it.",
  "assumptions": [
    "March 13 comes every year, so the count is never more than 365 days.",
    "The start date itself is not counted: from the day before March 13, the count is 1; on March 13 itself, it is 0.",
    "Start dates from January 1, 1900 to December 31, 2400 work for the count to March 13, the range the date field accepts.",
    "Today is the date on your own device, so the count to March 13 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 March 13",
      "description": "Whole days from the start date to the next March 13; 0 on the day itself.",
      "format": "integer"
    },
    "date": {
      "label": "Date",
      "description": "The next March 13 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": 164,
      "date": "2027-03-13",
      "weekday": "Saturday",
      "weeks": "23 weeks and 3 days"
    },
    "text": "From September 30, 2026, there are 164 days until March 13 on Saturday, March 13, 2027."
  },
  "examples": [
    {
      "given": {
        "from": "2027-03-13"
      },
      "expect": {
        "date": "2027-03-13",
        "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": "2027-01-01"
      },
      "expect": {
        "date": "2027-03-13",
        "days": 71
      },
      "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": "2027-03-14"
      },
      "expect": {
        "date": "2028-03-13",
        "days": 365
      },
      "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-march-12",
    "days-until-march-14",
    "days-until-march-1",
    "days-until-march-2",
    "days-until-march-3",
    "days-until-march-4",
    "days-until-march-5",
    "days-until-march-6",
    "days-until-march-7",
    "days-until-march-8",
    "days-until-march-9",
    "days-until-march-10",
    "days-until-march-11",
    "days-until-march-15",
    "days-until-march-16",
    "days-until-march-17",
    "days-until-march-18",
    "days-until-march-19",
    "days-until-march-20",
    "days-until-march-21",
    "days-until-march-22",
    "days-until-march-23",
    "days-until-march-24",
    "days-until-march-25",
    "days-until-march-26",
    "days-until-march-27",
    "days-until-march-28",
    "days-until-march-29",
    "days-until-march-30",
    "days-until-march-31",
    "days-between-dates"
  ],
  "changelog": []
}
