# FiscalCalendar

Industry: Core

Caller-supplied 52/53-week fiscal calendar. GMT bundles none, and has no defaults.

```ts
import type { FiscalCalendar } from "@northguild/gmt";
```

## Members

| Member | Type | Description |
| --- | --- | --- |
| `pattern` | `"4-5-4"` \| `"4-4-5"` \| `"5-4-4"` ([`FiscalPattern`](/gmt/reference/types/FiscalPattern/)) | The weeks per period within each quarter. |
| `yearEndsOn` | `string` | The year-end rule, stated as one ISO date: fiscal years end on this date's **weekday**, on the occurrence nearest this date's **month and day**. NRF (US) adds a 53rd week when "there are four or more days left in January", which is the Saturday nearest January 31: `"2026-01-31"`. One rule covers one run of years: ONS (UK) trading periods end on the Saturday nearest December 31 (`"2022-12-31"`) from 2004, but when December 31 fell on a Tuesday before then, on the Saturday after it (1997-01-04). Years before 2004 need a second `FiscalCalendar`. |
| `extraWeek` | `"firstPeriod"` \| `"lastPeriod"` ([`FiscalExtraWeek`](/gmt/reference/types/FiscalExtraWeek/)) | The period a 53rd week is added to. |
| `yearLabel` | `"startYear"` \| `"endYear"` \| `"majorityYear"` ([`FiscalYearLabel`](/gmt/reference/types/FiscalYearLabel/)) | The calendar year that names a fiscal year. |

## Definition

```ts
interface FiscalCalendar {
  /** The weeks per period within each quarter. */
  pattern: FiscalPattern;
  /**
   * The year-end rule, stated as one ISO date: fiscal years end on this date's **weekday**,
   * on the occurrence nearest this date's **month and day**. NRF (US) adds a 53rd week when
   * "there are four or more days left in January", which is the Saturday nearest
   * January 31: `"2026-01-31"`. One rule covers one run of years: ONS (UK) trading periods
   * end on the Saturday nearest December 31 (`"2022-12-31"`) from 2004, but when December 31
   * fell on a Tuesday before then, on the Saturday after it (1997-01-04). Years before 2004
   * need a second `FiscalCalendar`.
   */
  yearEndsOn: string;
  /** The period a 53rd week is added to. */
  extraWeek: FiscalExtraWeek;
  /** The calendar year that names a fiscal year. */
  yearLabel: FiscalYearLabel;
}
```

## Used by

- [`getFiscalPeriod`](/gmt/reference/calendar/calculate/getFiscalPeriod/)
- [`isValidFiscalCalendar`](/gmt/reference/calendar/validate/isValidFiscalCalendar/)

## Source

[types/fiscal-calendar.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/types/fiscal-calendar.ts)
