Skip to content

Aviation mistakes

  • Airline schedule dates in IATA SSIM files, METAR and TAF report times with no month, and NOTAM validity times.

The Aviation layer reads and writes the dates in airline schedule files, and reads the times in weather reports and notices to air missions. The mistakes around them are the ones a quick parser makes: reading the month letters as a word in the machine’s language, accepting lower case, fixing a century in code, writing a year the reader will place in another century, and judging a leap day without knowing the century. A METAR time has no month, and a NOTAM can end in a word or an estimate, so there are three more: assuming the current month, turning PERM into a date and dropping EST. Every output shown here is what the function returns.

HIGH

Reading the month through the locale

The three letters of an SSIM month are a fixed English code. A pattern parser given the platform's language rejects JAN on a machine set to Spanish and accepts ENE, which no file writes. parseSsimDate reads a constant table and never asks for a language.

Wrong

import { parseDateWithPattern } from "@northguild/gmt/plain/parse";
const locale = "es-ES"; // what the platform reports on this server
parseDateWithPattern("01JAN26", "ddMMMyy", locale, { yearWindow: 2000 });
// "" — the code is read as a Spanish word

Right

import { parseSsimDate } from "@northguild/gmt/aviation/parse";
parseSsimDate("01JAN26", { yearWindow: 2000 });
// "2026-01-01"
parseSsimDate("01ENE26", { yearWindow: 2000 });
// ""
output 
MEDIUM

Accepting lower case

SSIM writes the month letters in upper case. A parser that ignores case accepts jan, so a writer built beside it emits jan, and a file the other side rejects. parseSsimDate takes upper case only.

Wrong

import { parseDateWithPattern } from "@northguild/gmt/plain/parse";
parseDateWithPattern("01jan26", "ddMMMyy", "en", { yearWindow: 2000 });
// "2026-01-01" — a spelling no SSIM file writes

Right

import { parseSsimDate } from "@northguild/gmt/aviation/parse";
parseSsimDate("01jan26", { yearWindow: 2000 });
// ""
parseSsimDate("01Jan26", { yearWindow: 2000 });
// ""
parseSsimDate("01JAN26", { yearWindow: 2000 });
// "2026-01-01"
output 
HIGH

A century pivot fixed in code

A rule such as 'a year under 70 is 20xx' is right for the files of one period and wrong for the rest, and it flips the day it is passed. The century is a fact about your files. parseSsimDate takes the window you state, and gives nothing without one.

Wrong

const yy = 26;
const year = yy < 70 ? 2000 + yy : 1900 + yy;
// 2026 — and 01JAN70 in an archive from the 2070s is read as 1970

Right

import { parseSsimDate } from "@northguild/gmt/aviation/parse";
parseSsimDate("01JAN70", { yearWindow: 1970 });
// "1970-01-01"
parseSsimDate("01JAN70", { yearWindow: 1971 });
// "2070-01-01"
parseSsimDate("01JAN70", {});
// ""
output 
HIGH

Formatting a year outside the window

Writing a year as two digits drops its century. If the reader's window does not hold that year, it reads back as another one. formatSsimDate refuses a year outside the window you state, so what it writes reads back as the same date, with the same window.

Wrong

const year = 2100;
String(year).slice(-2);
// "00" — which a reader with a window from 2000 places in 2000

Right

import { formatSsimDate } from "@northguild/gmt/aviation/format";
formatSsimDate("2100-01-01", { yearWindow: 2000 });
// ""
formatSsimDate("2026-01-01", { yearWindow: 2000 });
// "01JAN26"
output 
MEDIUM

Validating without the window

Whether 29FEB00 exists depends on the century: 2000 was a leap year and 1900 was not. A check that never asks for the window cannot answer. isValidSsimDate takes the window, and is false without one.

Wrong

// a pattern that checks the shape and day 1 to 31
/^(0[1-9]|[12][0-9]|3[01])(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)[0-9]{2}$/.test("29FEB00");
// true — in which century?

Right

import { isValidSsimDate } from "@northguild/gmt/aviation/validate";
isValidSsimDate("29FEB00", { yearWindow: 2000 });
// true
isValidSsimDate("29FEB00", { yearWindow: 1900 });
// false
isValidSsimDate("29FEB00", {});
// false
output 
HIGH

Assuming the current month

A METAR time group is a day, an hour and a minute, with no month. Putting it in the month the report was received gives a time 30 days ahead for any report that crosses a month end. parseMetarTime takes the time the report was received and chooses the nearest candidate.

Wrong

const received = new Date("2024-07-01T00:05:00Z");
new Date(Date.UTC(received.getUTCFullYear(), received.getUTCMonth(), 30, 23, 50));
// 2024-07-30T23:50:00Z — the report was issued on 30 June

Right

import { parseMetarTime } from "@northguild/gmt/aviation/parse";
parseMetarTime("302350Z", "2024-07-01T00:05:00Z");
// "2024-06-30T23:50:00Z"
parseMetarTime("312350Z", "2024-07-01T00:05:00Z");
// "2024-05-31T23:50:00Z"
parseMetarTime("302350Z", "");
// ""
output 
HIGH

PERM as a date

PERM says a NOTAM has no end. A far-future date makes 'is it in force?' right until that day, and gives the NOTAM an expiry it never stated. parseNotamValidity returns { kind: 'permanent' }, which has nothing to compare.

Wrong

const end = c === "PERM" ? "9999-12-31T23:59:00Z" : toIso(c);
// a date for something that has no end

Right

import { parseNotamValidity } from "@northguild/gmt/aviation/parse";
parseNotamValidity("PERM", { yearWindow: 2000 });
// { kind: "permanent" }
parseNotamValidity("2506151200", { yearWindow: 2000 });
// { kind: "instant", instant: "2025-06-15T12:00:00Z", estimated: false }
output 
MEDIUM

Dropping EST

EST after the ten digits says the end is an estimate and the NOTAM may be replaced or cancelled first. Cutting it off with slice(0, 10) shows a guess as a promise. parseNotamValidity keeps the instant and sets estimated: true.

Wrong

const end = value.slice(0, 10); // "1407031230EST" becomes "1407031230"
// the estimate is now a firm end time

Right

import { parseNotamValidity } from "@northguild/gmt/aviation/parse";
parseNotamValidity("1407031230EST", { yearWindow: 2000 });
// { kind: "instant", instant: "2014-07-03T12:30:00Z", estimated: true }
parseNotamValidity("1407031230 EST", { yearWindow: 2000 });
// null
output 

See An SSIM Month Read in the Wrong Language, A METAR from Last Month, PERM Read as a Date, and the reasoning in Aviation: Message Times. To try a date yourself, use the SSIM Date Reader.

© 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.