isValidMetarTime
Signature
Section titled “Signature”isValidMetarTime(value: string, referenceInstant: string): booleanReturn true when value is a METAR, SPECI or TAF time group (YYGGggZ) that resolves against referenceInstant.
- True exactly when
parseMetarTimereturns an instant for the same arguments. It calls the parser, so the two cannot disagree. - It needs the reference. The group has no month or year, so a well-formed group against a reference that is not an ISO 8601 instant is false.
- UTC, no locale. The group is read as fixed ASCII text in UTC, never through
Intl.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | string | The value to check |
referenceInstant | string | An ISO 8601 instant with Z or an offset: the time the report was received or the archive’s timestamp |
Returns
Section titled “Returns”true for a time group that resolves against the reference, or false on invalid input
Examples
Section titled “Examples”import { isValidMetarTime } from "@northguild/gmt/aviation/validate";
isValidMetarTime("302350Z", "2024-07-01T00:05:00Z") // trueSource
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.