parseNotamValidity
Signature
Section titled “Signature”parseNotamValidity(value: string, options: TwoDigitYearOptions): NotamValidity | nullParse a NOTAM item B) or C) value as a UTC instant, an estimate, or a permanent validity.
- What it reads. The ten-digit date-time group
YYMMDDHHMMin UTC (item B and item C), the same group followed byESTwith no space (item C), orPERM(item C). One group at a time: noB)/C)label, no whitespace. PERMis a state. Permanent validity has no end, so it is{ kind: "permanent" }and not a far-future date. It still needsoptions.yearWindow: a call without a window is malformed, found on the first value and not on the first dated one.ESTkeeps its instant.estimated: truemarks the time as an estimate (the NOTAM is later replaced or cancelled), not an end.- The century is the caller’s.
options.yearWindowplacesYYin a hundred-year window: a fixed first year, for stored NOTAMs, or"rolling", for a live feed. WithoutyearWindowthe result isnull. - Nothing is corrected.
2400,WIEandUFNreturnnull; OPADD gives those fixes to a NOTAM Processing Unit, not to a reader. A month, day, hour or minute that does not exist returnsnull. - UTC in and out. Both are UTC by the standard, so no local wall time is resolved and no disambiguation policy applies.
- Sources. ICAO PANS-AIM (Doc 10066), Appendix 3 §5 and §6: the ten-figure group in UTC,
0000,2359and not2400,EST,PERM, and the later cancellation or replacement of anESTNOTAM. EUROCONTROL-GUID-121, OPADD Ed. 4.1, as the multinational peer, for what ICAO does not say: no space beforeESTand noWIE,WEF,UFNorAPRX DUR(§2.3.16, §2.3.17), and the corrections a NOTAM Processing Unit makes (Ch. 3).
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | string | A NOTAM item B) or C) value (e.g. “2506151200”, “1407031230EST”, “PERM”) |
Options
Section titled “Options”options
The hundred-year window a two-digit year is read in
Type: TwoDigitYearOptions.
| Option | Type | Default | Description |
|---|---|---|---|
yearWindow? | number | "rolling" | None. A value with a two-digit year returns the sentinel: no standard says which century it belongs to, so the caller states it. | The hundred-year window a two-digit year falls in. A number is the first year of a fixed window, an integer from 0 to 9900: 2000 reads 00–99 as 2000–2099; 1950 reads 50–99 as 1950–1999 and 00–49 as 2000–2049. A fixed window gives the same answer in any year, so it is the form for stored data, archives and anything re-processed later. "rolling" is the hundred years around today: from 50 years before the current UTC calendar year to 49 years after it (in 2026, 1976–2075). It is the form for live messages and never needs maintenance, but it gives a different answer for the same stored value as years pass. Any other value returns the function’s sentinel. |
Returns
Section titled “Returns”the validity ({ kind: “instant”, instant, estimated } or { kind: “permanent” }), or null on invalid input
NotamValidity
Section titled “NotamValidity”A NOTAM validity value: item B) (when the NOTAM comes into force) or item C) (when it ceases), as read by parseNotamValidity. ICAO PANS-AIM (Doc 10066), Appendix 3 §5 and §6; EUROCONTROL-GUID-121, OPADD Ed. 4.1, §2.3.16 and §2.3.17, as the multinational peer.
import type { NotamValidity } from "@northguild/gmt";type NotamValidity = /** A ten-digit date-time group `YYMMDDHHMM`, with or without `EST`. */ | { /** Always `"instant"`. */ kind: "instant"; /** The group as UTC, ISO 8601 ending in `Z`, seconds written (`2025-06-15T12:00:00Z`). */ instant: string; /** * `true` when item C) carried `EST`. PANS-AIM App 3 §6: "If the information on timing is * uncertain, the approximate duration shall be indicated using a date-time group followed * by the abbreviation 'EST'. Any NOTAM which includes an 'EST' shall be cancelled or * replaced before the date-time specified in Item C)". The time is an estimate, not an end. */ estimated: boolean; } /** * Item C) `PERM`: "the information is of a permanent nature" (PANS-AIM App 3 §6). It carries * no instant, on purpose: it has no end to compare against. */ | { /** Always `"permanent"`. */ kind: "permanent"; };Related types
Section titled “Related types”Examples
Section titled “Examples”import { parseNotamValidity } from "@northguild/gmt/aviation/parse";
parseNotamValidity("2506151200", { yearWindow: 2000 }) // { kind: "instant", instant: "2025-06-15T12:00:00Z", estimated: false }Source
Section titled “Source”© 2026 NorthGuild · Licences
Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.