{
  "address": "89b6f28af27216d07087f365646e5252",
  "category": "other",
  "question": "What calendar quarter and fiscal quarter/year does 2026-09-30 fall in, given a fiscal year starting in month 10?",
  "answer": "Calendar Q3 2026; fiscal Q4 FY2026",
  "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": "US federal fiscal year convention (October 1 - September 30, named for the ending calendar year)",
      "url": "https://www.fiscal.treasury.gov/reports-statements/"
    }
  ],
  "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://www.fiscal.treasury.gov/reports-statements/",
    "retrieved_utc": "2026-09-30T19:41:35Z"
  },
  "qsha256": "7b98a6ec1e4caca0a637ff36870115aa76b3d768686f728d74dfd4058d0da8c5",
  "runOne": null,
  "cardContractVersion": "card_contract/1",
  "deck_id": "method-deck",
  "deck_title": "Method Deck",
  "method": {
    "name": "Calendar quarter and fiscal year",
    "version": "1",
    "source_url_or_file": "methods/quarter-and-fiscal-year.cjs",
    "sha256_of_method_file": "aaf8bea3fcdeb55ce7c9678e4d684fef5c5036f065fb7a19d758078625658b00"
  },
  "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"
      },
      {
        "name": "fiscal_year_start_month",
        "type": "integer",
        "required": true,
        "min": 1,
        "max": 12,
        "description": "Month (1-12) the fiscal year starts in; 1 means the fiscal year equals the calendar year; 10 matches the US federal fiscal year"
      }
    ],
    "outputs": [
      {
        "name": "calendar_quarter",
        "description": "Q1-Q4 of the calendar year"
      },
      {
        "name": "fiscal_quarter",
        "description": "Q1-Q4 of the fiscal year"
      },
      {
        "name": "fiscal_year",
        "description": "The fiscal year label, named for the calendar year in which the fiscal year ends (matching the US federal convention)"
      }
    ],
    "steps": [
      "Parse the date as a proleptic Gregorian civil date.",
      "calendar_quarter = floor((month - 1) / 3) + 1.",
      "If fiscal_year_start_month is 1, the fiscal year always equals the calendar year (a fiscal year that starts and ends within the same January-December span cannot be named for a different year).",
      "Otherwise: if the date's month is on or after fiscal_year_start_month, the fiscal year is named for the NEXT calendar year (the fiscal year that starts this year and ends next year); if the month is before fiscal_year_start_month, it is named for the current calendar year (the fiscal year already in progress, started the prior calendar year).",
      "fiscal_quarter = floor(((month - fiscal_year_start_month + 12) mod 12) / 3) + 1."
    ],
    "constants": [],
    "examples": [
      {
        "name": "worked example",
        "inputs": {
          "date": "2026-09-30",
          "fiscal_year_start_month": 10
        },
        "expected": {
          "answer": "Calendar Q3 2026; fiscal Q4 FY2026"
        },
        "check": "September is calendar Q3; with an October-start fiscal year, Jul-Sep is fiscal Q4, and since month 9 < 10 the fiscal year is still named 2026"
      },
      {
        "name": "test vector: after the fiscal start",
        "inputs": {
          "date": "2025-11-15",
          "fiscal_year_start_month": 10
        },
        "expected": {
          "answer": "Calendar Q4 2025; fiscal Q1 FY2026"
        },
        "check": "November is calendar Q4 2025; October-December is fiscal Q1 of the fiscal year ending in 2026 (US federal FY2026 starts Oct 1, 2025)"
      },
      {
        "name": "test vector: fiscal year matches calendar year",
        "inputs": {
          "date": "2026-05-10",
          "fiscal_year_start_month": 1
        },
        "expected": {
          "answer": "Calendar Q2 2026; fiscal Q2 FY2026"
        },
        "check": "with a January-start fiscal year, fiscal figures always equal the plain calendar quarter and year"
      }
    ],
    "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://www.fiscal.treasury.gov/reports-statements/",
          "retrieved_utc": "2026-09-30T19:41:35Z"
        },
        "sha256": "cc6b3c8c72a2b3adf826e7c78700b3b129d77ad061165283dffadbfff932da87",
        "supersedes": null,
        "added_utc": "2026-09-30T22:39:30.722Z",
        "added_by": "method:Calendar quarter and fiscal year",
        "why": "the method that computed this answer",
        "check": null,
        "status_label": "pending",
        "signature": null
      }
    ]
  }
}
