Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ TAF reports are a little funky... FM, BECMG, PROB, weird validity periods, etc.

#### `parseTAFAsForecast`

Returns a more normalized TAF report than `parseTAF`. Most notably: while the `parseTAF` function returns initial weather conditions on the base of the returned result (and further conditions on `trends[]`), the `parseTAFAsForecast` function returns the initial weather conditions as the first element of the `forecast[]` property (with `type = undefined`), followed by subsequent trends. (For more, please see the above about the forecast abstraction.) This makes it much easier to render a UI similar to the [aviationweather.gov](https://www.aviationweather.gov/taf/data?ids=SBPJ&format=decoded&metars=off&layout=on) TAF decoder.
Returns a more normalized TAF report than `parseTAF`. Most notably: while the `parseTAF` function returns initial weather conditions on the base of the returned result (and further conditions on `trends[]`), the `parseTAFAsForecast` function returns the initial weather conditions as the first element of the `forecast[]` property (with `type = undefined`), followed by subsequent trends. (For more, please see the above about the forecast abstraction.) This makes it much easier to render a UI similar to the [aviationweather.gov](https://aviationweather.gov/data/taf/?decoded=1&ids=KMSN&metar=0&taf=1) TAF decoder.

```ts
import { parseTAFAsForecast } from "metar-taf-parser";
Expand Down
2 changes: 1 addition & 1 deletion src/model/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export enum TimeIndicator {
}

/**
* https://www.aviationweather.gov/taf/decoder
* https://web.archive.org/web/20230318235549/https://aviationweather.gov/taf/decoder
*/
export enum WeatherChangeType {
/**
Expand Down
2 changes: 1 addition & 1 deletion tests/parser/parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@ describe("TAFParser", () => {
});

// Note: I saw this in the wild. It would be great if this could be parsed eventually, but for now it appears to be an invalid TAF.
// (https://www.aviationweather.gov/taf/decoder#Date)
// (https://web.archive.org/web/20230318235549/https://aviationweather.gov/taf/decoder#Date)
//
// test("should parse without issued date", () => {
// const taf = new TAFParser(en).parse(
Expand Down