{
  "address": "05822e3e7b8de24750965dae6f94d144",
  "category": "other",
  "question": "What date is 5 business days after 2026-10-01 (Monday-Friday only, no holidays excluded)?",
  "answer": "2026-10-08",
  "askedBy": {
    "kind": "guest",
    "display": "method deck",
    "stamped": false,
    "id": null
  },
  "answeredBy": "method",
  "madeAt": "2026-09-30T22:39:30.722Z",
  "validUntil": null,
  "validityClass": "forever",
  "sources": [
    {
      "label": "chrono-Compatible Low-Level Date Algorithms",
      "url": "https://howardhinnant.github.io/date_algorithms.html"
    },
    {
      "label": "Data elements and interchange formats -- Information interchange -- Representation of dates and times",
      "url": null
    }
  ],
  "supersedes": null,
  "supersededBy": null,
  "isSeed": false,
  "seedSource": null,
  "seedAttribution": null,
  "duplicateOfQid": null,
  "publishedAt": null,
  "unpublishedAt": null,
  "voteCount": 0,
  "queuedForSubstrate": false,
  "answerMethod": "method",
  "unsourced": false,
  "source": {
    "kind": "url",
    "value": "https://howardhinnant.github.io/date_algorithms.html",
    "retrieved_utc": "2026-09-30T19:41:35Z"
  },
  "qsha256": "af87d0d791ab9f3d5e78be7d964e321d57b4cc2f36e6ccc80e1c525e90fd4ea0",
  "runOne": null,
  "cardContractVersion": "card_contract/1",
  "deck_id": "method-deck",
  "deck_title": "Method Deck",
  "method": {
    "name": "Add business days to a date",
    "version": "1",
    "source_url_or_file": "methods/add-business-days.cjs",
    "sha256_of_method_file": "2ba82ac0af5ccf9ddc4e47e225343afc2108bfbf020a024a3612ad746dfaa924"
  },
  "receipt": {
    "inSubstrate": false,
    "local": true,
    "modelCallsAtMint": 0,
    "tokensAtMint": 0
  },
  "method_deck": {
    "inputs": [
      {
        "name": "date",
        "type": "string",
        "format": "date",
        "required": true,
        "description": "ISO 8601 starting date, YYYY-MM-DD"
      },
      {
        "name": "business_days",
        "type": "integer",
        "required": true,
        "description": "Number of business days to add; negative subtracts business days"
      }
    ],
    "outputs": [
      {
        "name": "result_date",
        "format": "date",
        "description": "The resulting ISO 8601 date"
      }
    ],
    "steps": [
      "Parse the date as a proleptic Gregorian civil date and convert it to a day-number (Hinnant days_from_civil, cited above).",
      "Business-day convention used here: Monday through Friday are business days; Saturday and Sunday are not. This method does NOT exclude any holidays, only weekends.",
      "Step the day-number one day at a time in the sign of business_days (forward for positive, backward for negative).",
      "Each step, determine the ISO 8601 weekday (Monday=1 .. Sunday=7) from the day-number modulo 7; if it is not Saturday (6) or Sunday (7), count it against the remaining business-day total.",
      "Stop once the requested number of business days has been counted and convert the final day-number back to a civil date."
    ],
    "constants": [],
    "examples": [
      {
        "name": "worked example",
        "inputs": {
          "date": "2026-10-01",
          "business_days": 5
        },
        "expected": {
          "answer": "2026-10-08"
        },
        "check": "2026-10-01 is a Thursday; counting forward Fri 10-02(1), skip Sat/Sun, Mon 10-05(2), Tue 10-06(3), Wed 10-07(4), Thu 10-08(5)"
      },
      {
        "name": "test vector: starting on a Saturday",
        "inputs": {
          "date": "2026-10-03",
          "business_days": 1
        },
        "expected": {
          "answer": "2026-10-05"
        },
        "check": "2026-10-03 is a Saturday; the next business day, skipping Sunday 10-04, is Monday 2026-10-05"
      },
      {
        "name": "test vector: subtracting across a weekend",
        "inputs": {
          "date": "2026-10-06",
          "business_days": -3
        },
        "expected": {
          "answer": "2026-10-01"
        },
        "check": "2026-10-06 is a Tuesday; counting back Mon 10-05(1), skip Sun/Sat, Fri 10-02(2), Thu 10-01(3)"
      }
    ],
    "disclaimer": null,
    "deck_category": "dates"
  },
  "status": "minted",
  "kind": "method",
  "provenanceClass": "own_question",
  "provenance": {
    "schema": "card_provenance/2.0.0",
    "chain": [
      {
        "source": {
          "kind": "url",
          "value": "https://howardhinnant.github.io/date_algorithms.html",
          "retrieved_utc": "2026-09-30T19:41:35Z"
        },
        "sha256": "6a92f1fe70bb3c25cc06080e0656ea07bf2f8746cae3a2a1275825e5f665c846",
        "supersedes": null,
        "added_utc": "2026-09-30T22:39:30.722Z",
        "added_by": "method:Add business days to a date",
        "why": "the method that computed this answer",
        "check": null,
        "status_label": "pending",
        "signature": null
      }
    ]
  }
}
