atmosx-nwws-parser 1.0.181 → 1.0.182

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/events.js +5 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atmosx-nwws-parser",
3
- "version": "1.0.181",
3
+ "version": "1.0.182",
4
4
  "description": "NOAA Weather Wire Parser",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/events.js CHANGED
@@ -172,7 +172,7 @@ class NoaaWeatherWireServiceEvents {
172
172
  id: `Wire-${vtec.tracking}`,
173
173
  tracking: vtec.tracking,
174
174
  action: vtec.status,
175
- history: [{description: getDescription, action: vtec.status, issued: new Date(vtec.issued)}],
175
+ history: [{description: getDescription, action: vtec.status, issued: new Date(getTempIssue)}],
176
176
  properties: {
177
177
  areaDesc: mUgc.locations.join(`; `) || `N/A`,
178
178
  expires: new Date(vtec.expires) == `Invalid Date` ? new Date(9999, 0, 1) : new Date(vtec.expires),
@@ -226,7 +226,8 @@ class NoaaWeatherWireServiceEvents {
226
226
  let getTornado = loader.packages.mText.getString(msg, `TORNADO...`) || loader.packages.mText.getString(msg, `WATERSPOUT...`)
227
227
  let getHail = loader.packages.mText.getString(msg, `MAX HAIL SIZE...`, [`IN`]) || loader.packages.mText.getString(msg, `HAIL...`, [`IN`]);
228
228
  let getGusts = loader.packages.mText.getString(msg, `MAX WIND GUST...`) || loader.packages.mText.getString(msg, `WIND...`);
229
- let getThreat = loader.packages.mText.getString(msg, `DAMAGE THREAT...`);
229
+ let getThreat = loader.packages.mText.getString(msg, `DAMAGE THREAT...`);
230
+ let getTempIssue = loader.packages.mText.getString(msg, `ISSUED TIME...`) || new Date();
230
231
  let senderOffice = loader.packages.mText.getOffice(msg) || `NWS`;
231
232
  let getCoordinates = loader.packages.mText.getPolygonCoordinates(msg);
232
233
  let getDescription = loader.packages.mText.getCleanDescription(msg, null);
@@ -235,11 +236,11 @@ class NoaaWeatherWireServiceEvents {
235
236
  id: `Wire-${defaultWMO ? defaultWMO[0] : `N/A`}-${mUgc.zones.join(`-`)}`,
236
237
  tracking: `${defaultWMO ? defaultWMO[0] : `N/A`}-${mUgc.zones.join(`-`)}`,
237
238
  action: `Issued`,
238
- history: [{description: getDescription, action: `Issued`, issued: new Date(stanza.attributes.issue)}],
239
+ history: [{description: getDescription, action: `Issued`, issued: new Date(getTempIssue)}],
239
240
  properties: {
240
241
  areaDesc: mUgc.locations.join(`; `) || `N/A`,
241
242
  expires: new Date(new Date().getTime() + 1 * 60 * 60 * 1000),
242
- sent: new Date(stanza.attributes.issue),
243
+ sent: new Date(getTempIssue) == `Invalid Date` ? new Date(stanza.attributes.issue) : new Date(getTempIssue),
243
244
  messageType: `Issued`,
244
245
  event: `Special Weather Statement`,
245
246
  sender: senderOffice,