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