{
  "address": "c7f1588e7d1e5143d8f697fdcbfcc10e",
  "category": "other",
  "question": "What is the Julian Day Number of 2000-01-01?",
  "answer": "2451545",
  "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": "A Machine Algorithm for Processing Calendar Dates",
      "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": "14f7978de7c9add38a95edabb73db513297ed7fcf6c001325a6c92bdc1e8a538",
  "runOne": null,
  "cardContractVersion": "card_contract/1",
  "deck_id": "method-deck",
  "deck_title": "Method Deck",
  "method": {
    "name": "Julian Day Number of a civil date",
    "version": "1",
    "source_url_or_file": "methods/julian-day-number.cjs",
    "sha256_of_method_file": "c300e9aaa1ec27c3b141cb0cf719516b287f32e985d8eba4d33c059f67934b83"
  },
  "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": "jdn",
        "description": "Julian Day Number, an integer day count with no calendar gaps"
      }
    ],
    "steps": [
      "Parse the date as a proleptic Gregorian civil date.",
      "Convert it to a day-number using Hinnant's days_from_civil algorithm, which is arithmetically equivalent to the Fliegel and Van Flandern (1968) integer JDN formula.",
      "Add 2440588 (the JDN of 1970-01-01, the algorithm's epoch) to obtain the Julian Day Number."
    ],
    "constants": [
      {
        "name": "epoch_jdn_1970_01_01",
        "value": 2440588,
        "unit": "JDN",
        "source": 0
      }
    ],
    "examples": [
      {
        "name": "worked example",
        "inputs": {
          "date": "2000-01-01"
        },
        "expected": {
          "answer": "2451545"
        },
        "check": "2451545 is the well-known Julian Day Number for 2000-01-01 (the J2000.0 epoch date)"
      },
      {
        "name": "test vector: Unix epoch",
        "inputs": {
          "date": "1970-01-01"
        },
        "expected": {
          "answer": "2440588"
        },
        "check": "2440588 is the well-known Julian Day Number for the Unix epoch date, 1970-01-01"
      },
      {
        "name": "test vector: recent date",
        "inputs": {
          "date": "2024-01-01"
        },
        "expected": {
          "answer": "2460311"
        },
        "check": "computed independently as 2451545 + 8766 elapsed days between 2000-01-01 and 2024-01-01 (24 years of 365 days plus 6 intervening leap days: 2000, 04, 08, 12, 16, 20)"
      }
    ],
    "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": "5d743e83b766d1abb8b56fdbd3cb56acbb188f954a6d3f0fe1a895856d0a5aed",
        "supersedes": null,
        "added_utc": "2026-09-30T22:39:30.722Z",
        "added_by": "method:Julian Day Number of a civil date",
        "why": "the method that computed this answer",
        "check": null,
        "status_label": "pending",
        "signature": null
      }
    ]
  }
}
