{
  "address": "b05a15968f2f5d61c84c549313ab0900",
  "category": "other",
  "question": "What day of the week is 2000-01-01?",
  "answer": "Saturday",
  "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"
    }
  ],
  "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": "7d7433e670da10247993e7a88bc7d50e469672987a2881845af6451c53536cdd",
  "runOne": null,
  "cardContractVersion": "card_contract/1",
  "deck_id": "method-deck",
  "deck_title": "Method Deck",
  "method": {
    "name": "Weekday of a date",
    "version": "1",
    "source_url_or_file": "methods/weekday-of-date.cjs",
    "sha256_of_method_file": "d2245aad8a43e5a1d0059ae77babc58f5d457d3b37ff4c5187d66c203eee6679"
  },
  "receipt": {
    "inSubstrate": false,
    "local": true,
    "modelCallsAtMint": 0,
    "tokensAtMint": 0
  },
  "method_deck": {
    "inputs": [
      {
        "name": "date",
        "type": "string",
        "format": "date",
        "required": true,
        "description": "ISO 8601 date, YYYY-MM-DD"
      }
    ],
    "outputs": [
      {
        "name": "weekday",
        "description": "Name of the day of the week"
      }
    ],
    "steps": [
      "Parse the date as a proleptic Gregorian civil date (year, month, day).",
      "Compute its day-number using the Hinnant days_from_civil algorithm (equivalent to a Julian Day Number offset), which counts whole days since 1970-01-01.",
      "Take the day-number modulo 7. 1970-01-01 has day-number 0 and was a Thursday, so the remainder indexes into the cycle starting at Thursday.",
      "Map the remainder to a weekday name using that calibrated cycle."
    ],
    "constants": [
      {
        "name": "anchor_date",
        "value": "1970-01-01",
        "unit": "date",
        "source": 0
      },
      {
        "name": "anchor_weekday",
        "value": "Thursday",
        "unit": "weekday name",
        "source": 0
      }
    ],
    "examples": [
      {
        "name": "worked example",
        "inputs": {
          "date": "2000-01-01"
        },
        "expected": {
          "answer": "Saturday"
        },
        "check": "2000-01-01 being a Saturday is a widely documented calendar fact"
      },
      {
        "name": "test vector: Unix epoch",
        "inputs": {
          "date": "1970-01-01"
        },
        "expected": {
          "answer": "Thursday"
        },
        "check": "1970-01-01, the Unix epoch, is independently documented as a Thursday"
      },
      {
        "name": "test vector: recent date",
        "inputs": {
          "date": "2024-01-01"
        },
        "expected": {
          "answer": "Monday"
        },
        "check": "2024-01-01 being a Monday is a widely documented calendar fact"
      }
    ],
    "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": "a846b7736cfbf0c71531957441ea57b467fd8e2a688dd75d439963229a911c2d",
        "supersedes": null,
        "added_utc": "2026-09-30T22:39:30.722Z",
        "added_by": "method:Weekday of a date",
        "why": "the method that computed this answer",
        "check": null,
        "status_label": "pending",
        "signature": null
      }
    ]
  }
}
