{
  "id": "days-from-today",
  "version": "5014b0777295",
  "status": "published",
  "name": "Days From Today Calculator",
  "question": "Days from today: what date is it?",
  "summary": "Finds the date a number of calendar days or working days after or before today or any start date, skipping weekends and public holidays when asked.",
  "category": "days",
  "subcategory": "dates",
  "url": "https://www.acalculator.org/days/fromtoday-calculator",
  "markdown": "https://www.acalculator.org/days/fromtoday-calculator.md",
  "kind": "function",
  "method": "Add the number of days to the start date; for working days, step one day at a time and count only days that are not a chosen weekend day or an observed public holiday.",
  "assumptions": [
    "The start date itself is not counted: 1 day from Monday is Tuesday, and 1 working day from Friday is the next Monday.",
    "A negative number counts back in the same way: −1 working day from Monday is the Friday before.",
    "Dates are calendar days with no time of day, so daylight-saving changes cannot add or lose a day.",
    "Public holidays are the days off as observed (a holiday on a weekend moves to a weekday where the country’s rule says so). Holiday data covers the US from 1986, the UK (England and Wales) from 2019 to 2028, Canada (federal) from 2021, India (central government) from 2023 to 2027, and China from 2015 to 2035.",
    "Week numbers follow ISO 8601: weeks start on Monday, and week 1 is the week with the year’s first Thursday."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "days": {
        "title": "Number of days",
        "description": "How many days to count. A negative number counts back into the past.",
        "type": "integer",
        "minimum": -100000,
        "maximum": 100000
      },
      "start": {
        "title": "Start date",
        "description": "The date to count from. Today, unless you change it.",
        "type": "string",
        "format": "date"
      },
      "useWorkingDays": {
        "title": "Count working days only",
        "description": "Count only working days instead of every calendar day.",
        "type": "boolean"
      },
      "excludeSaturday": {
        "title": "Skip Saturdays",
        "description": "Leave Saturdays out of the count.",
        "type": "boolean"
      },
      "excludeSunday": {
        "title": "Skip Sundays",
        "description": "Leave Sundays out of the count.",
        "type": "boolean"
      },
      "excludeHolidays": {
        "title": "Skip public holidays",
        "description": "Leave the chosen country's public holidays out of the count.",
        "type": "boolean"
      },
      "country": {
        "title": "Country",
        "description": "The country whose public holidays are skipped.",
        "type": "string",
        "enum": [
          "us",
          "uk",
          "ca",
          "in",
          "cn"
        ]
      }
    }
  },
  "outputs": {
    "date": {
      "label": "Date",
      "description": "The date the given number of days after the start date, or before it for a negative number.",
      "format": "date-long"
    },
    "what": {
      "label": "Counted",
      "description": "How many calendar or working days were counted, and which way: for example “1 working day before” or “90 calendar days after”.",
      "format": "text"
    },
    "weekday": {
      "label": "Day of the week",
      "description": "The weekday of the result date.",
      "format": "text"
    },
    "dayOfYear": {
      "label": "Day of the year",
      "description": "The result date’s day number in its year, 1 to 366.",
      "format": "integer"
    },
    "week": {
      "label": "ISO week",
      "description": "The ISO 8601 week number of the result date (weeks start on Monday; week 1 holds the first Thursday).",
      "format": "integer"
    },
    "calendarDays": {
      "label": "Calendar days",
      "description": "Calendar days from the start date to the result date. Negative when the result is earlier.",
      "format": "integer"
    },
    "skipped": {
      "label": "Days skipped",
      "description": "Weekend days and public holidays passed over while counting working days.",
      "format": "integer"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "days": 90,
      "start": "2026-10-05",
      "useWorkingDays": false,
      "excludeSaturday": true,
      "excludeSunday": true,
      "excludeHolidays": true,
      "country": "us"
    },
    "outputs": {
      "date": "2027-01-03",
      "what": "90 calendar days after",
      "weekday": "Sunday",
      "dayOfYear": 3,
      "week": 53,
      "calendarDays": 90
    },
    "text": "90 calendar days after October 5, 2026 is Sunday, January 3, 2027."
  },
  "examples": [
    {
      "given": {
        "days": 90,
        "start": "2026-09-27",
        "useWorkingDays": false
      },
      "expect": {
        "what": "90 calendar days after",
        "date": "2026-12-26",
        "weekday": "Saturday",
        "dayOfYear": 360,
        "week": 52,
        "calendarDays": 90
      },
      "source": "hand calculation in content.mdx; Python: date(2026,9,27) + timedelta(90), isocalendar() week 52"
    },
    {
      "given": {
        "days": 1,
        "start": "2026-09-25",
        "useWorkingDays": true,
        "excludeSaturday": true,
        "excludeSunday": true,
        "excludeHolidays": false
      },
      "expect": {
        "what": "1 working day after",
        "date": "2026-09-28",
        "weekday": "Monday",
        "calendarDays": 3,
        "skipped": 2
      },
      "source": "hand calculation in content.mdx"
    },
    {
      "given": {
        "days": 10,
        "start": "2026-12-20",
        "useWorkingDays": true,
        "excludeSaturday": true,
        "excludeSunday": true,
        "excludeHolidays": true,
        "country": "us"
      },
      "expect": {
        "what": "10 working days after",
        "date": "2027-01-05",
        "calendarDays": 16,
        "skipped": 6,
        "week": 1
      },
      "source": "OPM federal holidays 2026 and 2027 (https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/); hand calculation in content.mdx"
    },
    {
      "given": {
        "days": 10,
        "start": "2026-12-20",
        "useWorkingDays": true,
        "excludeSaturday": true,
        "excludeSunday": true,
        "excludeHolidays": true,
        "country": "uk"
      },
      "expect": {
        "what": "10 working days after",
        "date": "2027-01-06",
        "calendarDays": 17,
        "skipped": 7
      },
      "source": "GOV.UK bank holidays (https://www.gov.uk/bank-holidays); hand calculation in content.mdx"
    },
    {
      "given": {
        "days": 365,
        "start": "2027-03-01",
        "useWorkingDays": false
      },
      "expect": {
        "what": "365 calendar days after",
        "date": "2028-02-29",
        "dayOfYear": 60
      },
      "source": "hand calculation in content.mdx; Python: date(2027,3,1) + timedelta(365) = 2028-02-29"
    },
    {
      "given": {
        "days": -30,
        "start": "2026-03-31",
        "useWorkingDays": false
      },
      "expect": {
        "what": "30 calendar days before",
        "date": "2026-03-01",
        "weekday": "Sunday",
        "calendarDays": -30
      },
      "source": "hand calculation in content.mdx: 30 days before March 31 is March 1"
    }
  ],
  "sources": [
    "U.S. Office of Personnel Management, Federal Holidays (5 U.S.C. 6103 and the weekend rule). https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/",
    "GOV.UK, UK bank holidays (England and Wales). https://www.gov.uk/bank-holidays",
    "Canada Labour Code, section 166, general holidays. https://laws-lois.justice.gc.ca/eng/acts/L-2/",
    "ISO 8601-1:2019, Date and time, week numbering (week 1 holds the first Thursday of the year)."
  ],
  "related": [
    "days-between-dates",
    "dob"
  ],
  "changelog": [
    {
      "date": "2026-09-28",
      "note": "Counted now reads like “1 working day before”, so a negative count has no minus sign in the answer."
    }
  ]
}
