{
  "id": "days-until-mlb-opening-day",
  "version": "f2a77778bdb2",
  "status": "published",
  "name": "Days Until MLB Opening Day",
  "question": "Days until Opening Day",
  "summary": "Counts the days from today, or any date you choose, to the next MLB Opening Day, with its date and day of the week.",
  "category": "days",
  "subcategory": "countdowns",
  "url": "https://www.acalculator.org/days/days-until-mlb-opening-day",
  "markdown": "https://www.acalculator.org/days/days-until-mlb-opening-day.md",
  "kind": "function",
  "method": "Find the first date of MLB Opening Day on or after the start date, then count the days from the start date to it.",
  "assumptions": [
    "Major League Baseball sets Opening Day in its season schedule: the traditional Opening Day of 2027 is Thursday, March 25, with an Opening Night game the evening before, on Wednesday, March 24.",
    "Start dates from July 16, 2026 to March 25, 2027 work, because MLB published the 2027 schedule on July 16, 2026, and has not yet published a later one.",
    "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 Opening Day",
      "description": "Whole days from the start date to the next MLB Opening Day; 0 on the day itself.",
      "format": "integer"
    },
    "date": {
      "label": "Date",
      "description": "The next date of MLB Opening Day 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-10-19"
    },
    "outputs": {
      "days": 157,
      "date": "2027-03-25",
      "weekday": "Thursday",
      "weeks": "22 weeks and 3 days"
    },
    "text": "From October 19, 2026, there are 157 days until MLB Opening Day on Thursday, March 25, 2027."
  },
  "examples": [
    {
      "given": {
        "from": "2026-07-16"
      },
      "expect": {
        "date": "2027-03-25",
        "days": 252
      },
      "source": "MLB.com, MLB releases 2027 regular-season schedule (July 16, 2026): traditional Opening Day on Thursday, March 25, 2027, with 14 games, and an Opening Night game on Wednesday, March 24. https://www.mlb.com/news/mlb-2027-schedule-released (retrieved 2026-10-18)"
    },
    {
      "given": {
        "from": "2026-10-18"
      },
      "expect": {
        "date": "2027-03-25",
        "days": 158
      },
      "source": "MLB.com, MLB releases 2027 regular-season schedule (July 16, 2026): traditional Opening Day on Thursday, March 25, 2027, with 14 games, and an Opening Night game on Wednesday, March 24. https://www.mlb.com/news/mlb-2027-schedule-released (retrieved 2026-10-18)"
    },
    {
      "given": {
        "from": "2027-03-24"
      },
      "expect": {
        "date": "2027-03-25",
        "days": 1
      },
      "source": "MLB.com, MLB releases 2027 regular-season schedule (July 16, 2026): traditional Opening Day on Thursday, March 25, 2027, with 14 games, and an Opening Night game on Wednesday, March 24. https://www.mlb.com/news/mlb-2027-schedule-released (retrieved 2026-10-18)"
    }
  ],
  "sources": [
    "MLB.com, MLB releases 2027 regular-season schedule (July 16, 2026): traditional Opening Day on Thursday, March 25, 2027, with 14 games, and an Opening Night game on Wednesday, March 24. https://www.mlb.com/news/mlb-2027-schedule-released (retrieved 2026-10-18)"
  ],
  "related": [
    "days-until-super-bowl",
    "days-until-nfl-draft",
    "days-until",
    "days-between-dates"
  ],
  "changelog": []
}
