PERM Read as a Date
PERM Read as a Date
A briefing tool keeps each NOTAM's end as a date, so it can ask whether the NOTAM is in force. A NOTAM's item C) says PERM. What is stored?
The naive approach
// The naive approach: give PERM an end date far away
function endOf(c: string): string {
return c === "PERM" ? "9999-12-31T23:59:00Z" : toIso(c);
}
endOf("PERM");
// "9999-12-31T23:59:00Z" — a date for something that has no end
isInForce(endOf("PERM"), "2026-11-11T12:00:00Z");
// true — until the last minute of 9999Watch it break
The naive approach silently produces wrong results — there is no GMT equivalent to demonstrate because the failure is not using GMT.
Why
Item C) says when a NOTAM ends, and `PERM` says it does not. A far-future date makes the check give the right answer today, so nothing fails. But the date is a claim the NOTAM never made. It sorts and groups with real end dates, it shows up in a report as an expiry, and it is wrong the moment a rule asks "how long until this ends?". `parseNotamValidity` returns `{ kind: "permanent" }`. There is no date to compare, so the code that reads it has to decide what permanent means. An `EST` end is different: it has an instant, and the result keeps it with `estimated: true`.
The gmt approach
import { parseNotamValidity } from "@northguild/gmt/aviation/parse";
parseNotamValidity("PERM", { yearWindow: 2000 });
// { kind: "permanent" }
parseNotamValidity("1407031230EST", { yearWindow: 2000 });
// { kind: "instant", instant: "2014-07-03T12:30:00Z", estimated: true }Same widget, working
The fix is to keep PERM as a state. See Aviation: Message
Times for the reasoning, and
Aviation mistakes for the others that come with it.
© 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.