generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.js
5374 lines (5367 loc) · 269 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// main.ts
var main_exports = {};
__export(main_exports, {
default: () => OpenWeather
});
module.exports = __toCommonJS(main_exports);
var import_obsidian = require("obsidian");
// getCurrentWeather.ts
async function getCurrentWeather(key, latitude, longitude, language, units, format) {
let weatherData;
let weatherString;
let url;
let aqiNumber;
let aqiString;
let urlAQI = `https://api.openweathermap.org/data/2.5/air_pollution?lat=${latitude}&lon=${longitude}&appid=${key}`;
if (latitude.length > 0 && longitude.length > 0 && key.length > 0) {
let reqAQI = await fetch(urlAQI);
let jsonAQI = await reqAQI.json();
if (jsonAQI.cod) {
aqiNumber = 0;
aqiString = "Air Quality Index is Not Available";
} else {
const aqiStringsArr = ["Good", "Fair", "Moderate", "Poor", "Very Poor"];
aqiNumber = jsonAQI.list[0].main.aqi;
aqiString = aqiStringsArr[aqiNumber - 1];
}
;
} else {
aqiNumber = 0;
aqiString = "Air Quality Index is Not Available";
}
;
if (latitude.length > 0 && longitude.length > 0) {
url = `https://api.openweathermap.org/data/2.5/weather?lat=${latitude}&lon=${longitude}&lang=${language}&appid=${key}&units=${units}`;
} else {
url = `https://api.openweathermap.org/data/2.5/weather?q=${location}&lang=${language}&appid=${key}&units=${units}`;
}
;
let req = await fetch(url);
let json = await req.json();
if (json.cod != 200) {
weatherString = "Error Code " + json.cod + ": " + json.message;
return weatherString;
}
;
let conditions = json.weather[0].description;
let id = json.weather[0].id;
let conditionsEm = "";
if (id > 199 && id < 300) {
conditionsEm = "\u26C8\uFE0F";
}
;
if (id > 299 && id < 500) {
conditionsEm = "\u{1F326}\uFE0F";
}
;
if (id > 499 && id < 600) {
conditionsEm = "\u{1F327}\uFE0F";
}
;
if (id > 599 && id < 700) {
conditionsEm = "\u2744\uFE0F";
}
;
if (id > 699 && id < 800) {
conditionsEm = "\u{1F32B}\uFE0F";
}
;
if (id == 771) {
conditionsEm = "\u{1F300}";
}
;
if (id == 781) {
conditionsEm = "\u{1F32A}\uFE0F";
}
;
if (id == 800) {
conditionsEm = "\u{1F506}";
}
;
if (id > 800 && id < 804) {
conditionsEm = "\u{1F325}\uFE0F";
}
;
if (id == 804) {
conditionsEm = "\u2601\uFE0F";
}
;
conditions = conditions.replace(/^\w|\s\w/g, (c2) => c2.toUpperCase());
let iconName = json.weather[0].icon;
const iconApi = await fetch("https://openweathermap.org/img/wn/" + iconName + ".png");
let iconUrl = iconApi.url;
const iconApi2x = await fetch("https://openweathermap.org/img/wn/" + iconName + "@2x.png");
let iconUrl2x = iconApi2x.url;
let temp = json.main.temp;
temp = Math.round(temp);
let feelsLike = json.main.feels_like;
feelsLike = Math.round(feelsLike);
let tempMin = json.main.temp_min;
tempMin = Math.round(tempMin);
let tempMax = json.main.temp_max;
tempMax = Math.round(tempMax);
let pressure = json.main.pressure;
let humidity = json.main.humidity;
let seaLevel = json.main.sea_level;
let groundLevel = json.main.grnd_level;
let visibility = json.visibility;
let windSpeed = json.wind.speed;
let windSpeedms = json.wind.speed;
if (this.units == "metric") {
windSpeed = Math.round(windSpeed * 3.6);
windSpeedms = Math.round(windSpeedms);
} else {
windSpeed = Math.round(windSpeed);
}
let windDirection = json.wind.deg;
const directions = ["North", "Northeast", "East", "Southeast", "South", "Southwest", "West", "Northwest"];
windDirection = directions[Math.round(windDirection / 45) % 8];
let windGust = json.wind.gust;
if (windGust != void 0) {
if (this.units == "metric") {
windGust = Math.round(windGust * 3.6);
} else {
windGust = Math.round(windGust);
}
} else {
windGust = "N/A";
}
let clouds = json.clouds.all;
let rain1h;
let rain3h;
let snow1h;
let snow3h;
let precipitation1h;
let precipitation3h;
if (json.rain != void 0) {
let rainObj = json.rain;
let keys = Object.keys(rainObj);
let values = Object.values(rainObj);
if (keys[0] === "1h") {
rain1h = values[0];
} else if (keys[0] === "3h") {
rain3h = values[0];
}
if (keys.length > 1) {
if (keys[1] === "1h") {
rain1h = values[1];
} else if (keys[1] === "3h") {
rain3h = values[1];
}
}
} else {
rain1h = 0;
rain3h = 0;
}
if (rain1h === void 0) {
rain1h = 0;
}
;
if (rain3h === void 0) {
rain3h = 0;
}
;
if (json.snow != void 0) {
let snowObj = json.snow;
let keys = Object.keys(snowObj);
let values = Object.values(snowObj);
if (keys[0] === "1h") {
snow1h = values[0];
} else if (keys[0] === "3h") {
snow3h = values[0];
}
if (keys.length > 1) {
if (keys[1] === "1h") {
snow1h = values[1];
} else if (keys[1] === "3h") {
snow3h = values[1];
}
}
} else {
snow1h = 0;
snow3h = 0;
}
if (snow1h === void 0) {
snow1h = 0;
}
;
if (snow3h === void 0) {
snow3h = 0;
}
;
precipitation1h = rain1h || snow1h;
precipitation3h = rain3h || snow3h;
let dt = json.dt;
let a = new Date(dt * 1e3);
const months1 = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
const months2 = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
const months3 = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
const months4 = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
let year1 = a.getFullYear();
let year2str = String(year1).slice(-2);
let year2 = Number(year2str);
let month1 = months1[a.getMonth()];
let month2 = months2[a.getMonth()];
let month3 = months3[a.getMonth()];
let month4 = months4[a.getMonth()];
let date1 = a.getDate();
let date2 = a.getDate() < 10 ? "0" + a.getDate() : a.getDate();
let ampm1 = "AM";
let ampm2 = "am";
if (a.getHours() > 11) {
ampm1 = "PM";
ampm2 = "pm";
}
let hour1 = a.getHours();
let hour2 = a.getHours();
if (a.getHours() > 12) {
hour2 = a.getHours() - 12;
}
if (a.getHours() == 0) {
hour1 = 12;
hour2 = 12;
}
let min = a.getMinutes() < 10 ? "0" + a.getMinutes() : a.getMinutes();
let sec = a.getSeconds() < 10 ? "0" + a.getSeconds() : a.getSeconds();
let sr = json.sys.sunrise;
let b = new Date(sr * 1e3);
let srhour = b.getHours() < 10 ? "0" + b.getHours() : b.getHours();
let srmin = b.getMinutes() < 10 ? "0" + b.getMinutes() : b.getMinutes();
let srsec = b.getSeconds() < 10 ? "0" + b.getSeconds() : b.getSeconds();
let sunrise = srhour + ":" + srmin + ":" + srsec;
let ss = json.sys.sunset;
let c = new Date(ss * 1e3);
let sshour = c.getHours() < 10 ? "0" + c.getHours() : c.getHours();
let ssmin = c.getMinutes() < 10 ? "0" + c.getMinutes() : c.getMinutes();
let sssec = c.getSeconds() < 10 ? "0" + c.getSeconds() : c.getSeconds();
let sunset = sshour + ":" + ssmin + ":" + sssec;
let name = json.name;
let lat = json.coord.lat;
let lon = json.coord.lon;
weatherData = {
"status": "ok",
"conditions": conditions,
"conditionsEm": conditionsEm,
"icon": iconUrl,
"icon2x": iconUrl2x,
"temp": temp,
"feelsLike": feelsLike,
"tempMin": tempMin,
"tempMax": tempMax,
"pressure": pressure,
"humidity": humidity,
"seaLevel": seaLevel,
"groundLevel": groundLevel,
"visibility": visibility,
"windSpeed": windSpeed,
"windSpeedms": windSpeedms,
"windDirection": windDirection,
"windGust": windGust,
"clouds": clouds,
"rain1h": rain1h,
"rain3h": rain3h,
"snow1h": snow1h,
"snow3h": snow3h,
"precipitation1h": precipitation1h,
"precipitation3h": precipitation3h,
"year1": year1,
"year2": year2,
"month1": month1,
"month2": month2,
"month3": month3,
"month4": month4,
"date1": date1,
"date2": date2,
"ampm1": ampm1,
"ampm2": ampm2,
"hour1": hour1,
"hour2": hour2,
"min": min,
"sec": sec,
"sunrise": sunrise,
"sunset": sunset,
"name": name,
"latitude": lat,
"longitude": lon,
"aqiNum": aqiNumber,
"aqiStr": aqiString
};
weatherString = format.replace(/%desc%/gmi, weatherData.conditions);
weatherString = weatherString.replace(/%desc-em%/gmi, weatherData.conditionsEm);
weatherString = weatherString.replace(/%icon%/gmi, `<img src=${weatherData.icon} />`);
weatherString = weatherString.replace(/%icon2x%/gmi, `<img src=${weatherData.icon} />`);
weatherString = weatherString.replace(/%temp%/gmi, weatherData.temp);
weatherString = weatherString.replace(/%feels%/gmi, weatherData.feelsLike);
weatherString = weatherString.replace(/%tempmin%/gmi, weatherData.tempMin);
weatherString = weatherString.replace(/%tempmax%/gmi, weatherData.tempMax);
weatherString = weatherString.replace(/%pressure%/gmi, weatherData.pressure);
weatherString = weatherString.replace(/%humidity%/gmi, weatherData.humidity);
weatherString = weatherString.replace(/%pressure-sl%/gmi, weatherData.seaLevel);
weatherString = weatherString.replace(/%pressure-gl%/gmi, weatherData.groundLevel);
weatherString = weatherString.replace(/%visibility%/gmi, weatherData.visibility);
weatherString = weatherString.replace(/%wind-speed%/gmi, weatherData.windSpeed);
weatherString = weatherString.replace(/%wind-speed-ms%/gmi, weatherData.windSpeedms);
weatherString = weatherString.replace(/%wind-dir%/gmi, weatherData.windDirection);
if (weatherData.windGust == "N/A") {
weatherString = weatherString.replace(/\^.+\^/gmi, "");
} else {
weatherString = weatherString.replace(/%wind-gust%/gmi, weatherData.windGust);
weatherString = weatherString.replace(/\^(.+)\^/gmi, "$1");
}
weatherString = weatherString.replace(/%clouds%/gmi, `${weatherData.clouds}`);
weatherString = weatherString.replace(/%rain1h%/gmi, `${weatherData.rain1h}`);
weatherString = weatherString.replace(/%rain3h%/gmi, `${weatherData.rain3h}`);
weatherString = weatherString.replace(/%snow1h%/gmi, `${weatherData.snow1h}`);
weatherString = weatherString.replace(/%snow3h%/gmi, `${weatherData.snow3h}`);
weatherString = weatherString.replace(/%precipitation1h%/gmi, `${weatherData.precipitation1h}`);
weatherString = weatherString.replace(/%precipitation3h%/gmi, `${weatherData.precipitation3h}`);
weatherString = weatherString.replace(/%dateYear1%/gmi, `${weatherData.year1}`);
weatherString = weatherString.replace(/%dateYear2%/gmi, `${weatherData.year2}`);
weatherString = weatherString.replace(/%dateMonth1%/gmi, `${weatherData.month1}`);
weatherString = weatherString.replace(/%dateMonth2%/gmi, `${weatherData.month2}`);
weatherString = weatherString.replace(/%dateMonth3%/gmi, `${weatherData.month3}`);
weatherString = weatherString.replace(/%dateMonth4%/gmi, `${weatherData.month4}`);
weatherString = weatherString.replace(/%dateDay1%/gmi, `${weatherData.date1}`);
weatherString = weatherString.replace(/%dateDay2%/gmi, `${weatherData.date2}`);
weatherString = weatherString.replace(/%ampm1%/gmi, `${weatherData.ampm1}`);
weatherString = weatherString.replace(/%ampm2%/gmi, `${weatherData.ampm2}`);
weatherString = weatherString.replace(/%timeH1%/gmi, `${weatherData.hour1}`);
weatherString = weatherString.replace(/%timeH2%/gmi, `${weatherData.hour2}`);
weatherString = weatherString.replace(/%timeM%/gmi, `${weatherData.min}`);
weatherString = weatherString.replace(/%timeS%/gmi, `${weatherData.sec}`);
weatherString = weatherString.replace(/%sunrise%/gmi, `${weatherData.sunrise}`);
weatherString = weatherString.replace(/%sunset%/gmi, `${weatherData.sunset}`);
weatherString = weatherString.replace(/%name%/gmi, `${weatherData.name}`);
weatherString = weatherString.replace(/%latitude%/gmi, `${weatherData.latitude}`);
weatherString = weatherString.replace(/%longitude%/gmi, `${weatherData.longitude}`);
weatherString = weatherString.replace(/%aqinumber%/gmi, `${weatherData.aqiNum}`);
weatherString = weatherString.replace(/%aqistring%/gmi, `${weatherData.aqiStr}`);
return weatherString;
}
// node_modules/date-fns/toDate.mjs
function toDate(argument) {
const argStr = Object.prototype.toString.call(argument);
if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
return new argument.constructor(+argument);
} else if (typeof argument === "number" || argStr === "[object Number]" || typeof argument === "string" || argStr === "[object String]") {
return new Date(argument);
} else {
return new Date(NaN);
}
}
// node_modules/date-fns/fromUnixTime.mjs
function fromUnixTime(unixTime) {
return toDate(unixTime * 1e3);
}
// getForecastWeather.ts
async function getForecastWeather(key, latitude, longitude, language, units, format) {
let weatherData;
let weatherString;
let url;
let aqiNumber;
let aqiString;
let localeJson = {};
if (latitude.length > 0 && longitude.length > 0) {
url = `https://api.openweathermap.org/data/2.5/forecast?lat=${latitude}&lon=${longitude}&lang=${language}&appid=${key}&units=${units}`;
} else {
url = `https://api.openweathermap.org/data/2.5/forecast?q=${this}&lang=${this}&appid=${key}&units=${units}`;
}
;
let req = await fetch(url);
let json = await req.json();
if (json.cod != 200) {
weatherString = "Error Code " + json.cod + ": " + json.message;
return weatherString;
}
;
let listCount = json.cnt;
let listForecasts = [];
let todayDates = new Date().getDate();
for (let idx = 0; idx < listCount; idx++) {
let forecastObj = {
"clouds": 0,
"fyear": "",
"fmonth": "",
"fdate": "",
"fhours": "",
"fmins": "",
"fsecs": "",
"dt_localtime": "",
"d_localtime": "",
"ds_localtime": "",
"t_localtime": "",
"ts_localtime": "",
"main": {
"feels_like": 0,
"grnd_level": 0,
"humidity": 0,
"pressure": 0,
"sea_level": 0,
"temp": 0,
"temp_kf": 0,
"temp_max": 0,
"temp_min": 0
},
"pop": 0,
"snow": 0,
"rain": 0,
"pod": "",
"visibility": 0,
"weather": {
[0]: {
"description": "",
"descriptionem": "",
"icon": "",
"iconurl": "",
"iconurl2x": "",
"id": 0,
"main": ""
}
},
"wind": {
"deg": 0,
"dir": "",
"gust": 0,
"gustms": 0,
"speed": 0,
"speedms": 0
}
};
let unix_timestamp = json.list[idx].dt;
forecastObj.clouds = json.list[idx].clouds.all;
let year = fromUnixTime(unix_timestamp).getFullYear().toString();
forecastObj.fyear = year;
let m = fromUnixTime(unix_timestamp).getMonth() + 1;
let month = "0" + m.toString().slice(-2);
forecastObj.fmonth = month;
let date = "0" + fromUnixTime(unix_timestamp).getDate();
date = date.slice(-2);
forecastObj.fdate = date;
let hours = "0" + fromUnixTime(unix_timestamp).getHours();
hours = hours.slice(-2);
forecastObj.fhours = hours;
let mins = "0" + fromUnixTime(unix_timestamp).getMinutes();
mins = mins.slice(-2);
forecastObj.fmins = mins;
let secs = "0" + fromUnixTime(unix_timestamp).getSeconds();
secs = secs.slice(-2);
forecastObj.fsecs = secs;
forecastObj.dt_localtime = year + "-" + month + "-" + date + " " + hours + ":" + mins + ":" + secs;
forecastObj.d_localtime = year + "-" + month + "-" + date;
forecastObj.ds_localtime = month + "-" + date;
forecastObj.t_localtime = hours + ":" + mins + ":" + secs;
forecastObj.ts_localtime = hours + ":" + mins;
forecastObj.main = json.list[idx].main;
forecastObj.pop = json.list[idx].pop * 100;
if (json.list[idx].rain == void 0) {
forecastObj.rain = 0;
} else {
forecastObj.rain = json.list[idx].rain["3h"];
}
;
if (json.list[idx].snow == void 0) {
forecastObj.snow = 0;
} else {
forecastObj.snow = json.list[idx].snow["3h"];
}
;
forecastObj.visibility = json.list[idx].visibility;
forecastObj.pod = json.list[idx].sys.pod;
forecastObj.weather = json.list[idx].weather;
let id = json.list[idx].weather[0].id;
let description = json.list[idx].weather[0].description.replace(/^\w|\s\w/g, (c) => c.toUpperCase());
forecastObj.weather[0].description = description;
let descriptionEm = "";
if (id > 199 && id < 300) {
descriptionEm = "\u26C8\uFE0F";
}
;
if (id > 299 && id < 500) {
descriptionEm = "\u{1F326}\uFE0F";
}
;
if (id > 499 && id < 600) {
descriptionEm = "\u{1F327}\uFE0F";
}
;
if (id > 599 && id < 700) {
descriptionEm = "\u2744\uFE0F";
}
;
if (id > 699 && id < 800) {
descriptionEm = "\u{1F32B}\uFE0F";
}
;
if (id == 771) {
descriptionEm = "\u{1F300}";
}
;
if (id == 781) {
descriptionEm = "\u{1F32A}\uFE0F";
}
;
if (id == 800) {
descriptionEm = "\u{1F506}";
}
;
if (id > 800 && id < 804) {
descriptionEm = "\u{1F325}\uFE0F";
}
;
if (id == 804) {
descriptionEm = "\u2601\uFE0F";
}
;
forecastObj.weather[0].descriptionem = descriptionEm;
let iconName = json.list[idx].weather[0].icon;
const iconApi = await fetch("https://openweathermap.org/img/wn/" + iconName + ".png");
const iconApi2x = await fetch("https://openweathermap.org/img/wn/" + iconName + "@2x.png");
forecastObj.weather[0].iconurl = iconApi.url;
forecastObj.weather[0].iconurl2x = iconApi2x.url;
if (json.list[idx].wind == void 0) {
forecastObj.wind.speed = 0;
forecastObj.wind.speedms = 0;
forecastObj.wind.deg = 0;
forecastObj.wind.dir = "N/A";
forecastObj.wind.gust = 0;
forecastObj.wind.gustms = 0;
}
;
if (json.list[idx].wind.speed == void 0) {
forecastObj.wind.speed = 0;
forecastObj.wind.speedms = 0;
} else {
if (units == "metric") {
forecastObj.wind.speed = Math.round(json.list[idx].wind.speed * 3.6);
forecastObj.wind.speedms = Math.round(json.list[idx].wind.speed);
} else {
forecastObj.wind.speed = Math.round(json.list[idx].wind.speed);
}
;
}
;
const directions = ["North", "Northeast", "East", "Southeast", "South", "Southwest", "West", "Northwest"];
if (json.list[idx].wind.deg == void 0) {
forecastObj.wind.deg = 0;
forecastObj.wind.dir = "N/A";
} else {
forecastObj.wind.deg = json.list[idx].wind.deg;
forecastObj.wind.dir = directions[Math.round(json.list[idx].wind.deg / 45) % 8];
}
;
if (json.list[idx].wind.gust == void 0) {
forecastObj.wind.gust = 0;
} else {
if (units == "metric") {
forecastObj.wind.gust = Math.round(json.list[idx].wind.speed * 3.6);
forecastObj.wind.gustms = Math.round(json.list[idx].wind.gust);
} else {
forecastObj.wind.gust = Math.round(json.list[idx].wind.speed);
}
;
}
;
listForecasts.push(forecastObj);
}
;
let next12 = listForecasts[0].ds_localtime + " - " + listForecasts[0].ts_localtime + " " + listForecasts[0].weather[0].descriptionem + " " + listForecasts[0].weather[0].description + " Temp: " + Math.round(listForecasts[0].main.temp) + " Feels Like: " + Math.round(listForecasts[0].main.feels_like) + "\n" + listForecasts[1].ds_localtime + " - " + listForecasts[1].ts_localtime + " " + listForecasts[1].weather[0].descriptionem + " " + listForecasts[1].weather[0].description + " Temp: " + Math.round(listForecasts[1].main.temp) + " Feels Like: " + Math.round(listForecasts[1].main.feels_like) + "\n" + listForecasts[2].ds_localtime + " - " + listForecasts[2].ts_localtime + " " + listForecasts[2].weather[0].descriptionem + " " + listForecasts[2].weather[0].description + " Temp: " + Math.round(listForecasts[2].main.temp) + " Feels Like: " + Math.round(listForecasts[2].main.feels_like) + "\n" + listForecasts[3].ds_localtime + " - " + listForecasts[3].ts_localtime + " " + listForecasts[3].weather[0].descriptionem + " " + listForecasts[3].weather[0].description + " Temp: " + Math.round(listForecasts[3].main.temp) + " Feels Like: " + Math.round(listForecasts[3].main.feels_like) + "\n";
let next24 = next12 + listForecasts[4].ds_localtime + " - " + listForecasts[4].ts_localtime + " " + listForecasts[3].weather[0].descriptionem + " " + listForecasts[4].weather[0].description + " Temp: " + Math.round(listForecasts[4].main.temp) + " Feels Like: " + Math.round(listForecasts[4].main.feels_like) + "\n" + listForecasts[5].ds_localtime + " - " + listForecasts[5].ts_localtime + " " + listForecasts[5].weather[0].descriptionem + " " + listForecasts[5].weather[0].description + " Temp: " + Math.round(listForecasts[5].main.temp) + " Feels Like: " + Math.round(listForecasts[5].main.feels_like) + "\n" + listForecasts[6].ds_localtime + " - " + listForecasts[6].ts_localtime + " " + listForecasts[6].weather[0].descriptionem + " " + listForecasts[6].weather[0].description + " Temp: " + Math.round(listForecasts[6].main.temp) + " Feels Like: " + Math.round(listForecasts[6].main.feels_like) + "\n" + listForecasts[7].ds_localtime + " - " + listForecasts[7].ts_localtime + " " + listForecasts[7].weather[0].descriptionem + " " + listForecasts[7].weather[0].description + " Temp: " + Math.round(listForecasts[7].main.temp) + " Feels Like: " + Math.round(listForecasts[6].main.feels_like) + "\n";
let next48 = next24 + listForecasts[8].ds_localtime + " - " + listForecasts[8].ts_localtime + " " + listForecasts[8].weather[0].descriptionem + " " + listForecasts[8].weather[0].description + " Temp: " + Math.round(listForecasts[8].main.temp) + " Feels Like: " + Math.round(listForecasts[8].main.feels_like) + "\n" + listForecasts[9].ds_localtime + " - " + listForecasts[9].ts_localtime + " " + listForecasts[9].weather[0].descriptionem + " " + listForecasts[9].weather[0].description + " Temp: " + Math.round(listForecasts[9].main.temp) + " Feels Like: " + Math.round(listForecasts[9].main.feels_like) + "\n" + listForecasts[10].ds_localtime + " - " + listForecasts[10].ts_localtime + " " + listForecasts[10].weather[0].descriptionem + " " + listForecasts[10].weather[0].description + " Temp: " + Math.round(listForecasts[10].main.temp) + " Feels Like: " + Math.round(listForecasts[10].main.feels_like) + "\n" + listForecasts[11].ds_localtime + " - " + listForecasts[11].ts_localtime + " " + listForecasts[11].weather[0].descriptionem + " " + listForecasts[11].weather[0].description + " Temp: " + Math.round(listForecasts[11].main.temp) + " Feels Like: " + Math.round(listForecasts[11].main.feels_like) + "\n" + listForecasts[12].ds_localtime + " - " + listForecasts[12].ts_localtime + " " + listForecasts[12].weather[0].descriptionem + " " + listForecasts[12].weather[0].description + " Temp: " + Math.round(listForecasts[12].main.temp) + " Feels Like: " + Math.round(listForecasts[12].main.feels_like) + "\n" + listForecasts[13].ds_localtime + " - " + listForecasts[13].ts_localtime + " " + listForecasts[13].weather[0].descriptionem + " " + listForecasts[13].weather[0].description + " Temp: " + Math.round(listForecasts[13].main.temp) + " Feels Like: " + Math.round(listForecasts[13].main.feels_like) + "\n" + listForecasts[14].ds_localtime + " - " + listForecasts[14].ts_localtime + " " + listForecasts[14].weather[0].descriptionem + " " + listForecasts[14].weather[0].description + " Temp: " + Math.round(listForecasts[14].main.temp) + " Feels Like: " + Math.round(listForecasts[14].main.feels_like) + "\n" + listForecasts[15].ds_localtime + " - " + listForecasts[15].ts_localtime + " " + listForecasts[15].weather[0].descriptionem + " " + listForecasts[15].weather[0].description + " Temp: " + Math.round(listForecasts[15].main.temp) + " Feels Like: " + Math.round(listForecasts[15].main.feels_like) + "\n";
let fyear_00 = listForecasts[0].fyear;
let fyear_01 = listForecasts[1].fyear;
let fyear_02 = listForecasts[2].fyear;
let fyear_03 = listForecasts[3].fyear;
let fyear_04 = listForecasts[4].fyear;
let fyear_05 = listForecasts[5].fyear;
let fyear_06 = listForecasts[6].fyear;
let fyear_07 = listForecasts[7].fyear;
let fyear_08 = listForecasts[8].fyear;
let fyear_09 = listForecasts[9].fyear;
let fyear_10 = listForecasts[10].fyear;
let fyear_11 = listForecasts[11].fyear;
let fyear_12 = listForecasts[12].fyear;
let fyear_13 = listForecasts[13].fyear;
let fyear_14 = listForecasts[14].fyear;
let fyear_15 = listForecasts[15].fyear;
let fyear_16 = listForecasts[16].fyear;
let fyear_17 = listForecasts[17].fyear;
let fyear_18 = listForecasts[18].fyear;
let fyear_19 = listForecasts[19].fyear;
let fyear_20 = listForecasts[20].fyear;
let fyear_21 = listForecasts[21].fyear;
let fyear_22 = listForecasts[22].fyear;
let fyear_23 = listForecasts[23].fyear;
let fyear_24 = listForecasts[24].fyear;
let fyear_25 = listForecasts[25].fyear;
let fyear_26 = listForecasts[26].fyear;
let fyear_27 = listForecasts[27].fyear;
let fyear_28 = listForecasts[28].fyear;
let fyear_29 = listForecasts[29].fyear;
let fyear_30 = listForecasts[30].fyear;
let fyear_31 = listForecasts[31].fyear;
let fyear_32 = listForecasts[32].fyear;
let fyear_33 = listForecasts[33].fyear;
let fyear_34 = listForecasts[34].fyear;
let fyear_35 = listForecasts[35].fyear;
let fyear_36 = listForecasts[36].fyear;
let fyear_37 = listForecasts[37].fyear;
let fyear_38 = listForecasts[38].fyear;
let fyear_39 = listForecasts[39].fyear;
let fmonth_00 = listForecasts[0].fmonth;
let fmonth_01 = listForecasts[1].fmonth;
let fmonth_02 = listForecasts[2].fmonth;
let fmonth_03 = listForecasts[3].fmonth;
let fmonth_04 = listForecasts[4].fmonth;
let fmonth_05 = listForecasts[5].fmonth;
let fmonth_06 = listForecasts[6].fmonth;
let fmonth_07 = listForecasts[7].fmonth;
let fmonth_08 = listForecasts[8].fmonth;
let fmonth_09 = listForecasts[9].fmonth;
let fmonth_10 = listForecasts[10].fmonth;
let fmonth_11 = listForecasts[11].fmonth;
let fmonth_12 = listForecasts[12].fmonth;
let fmonth_13 = listForecasts[13].fmonth;
let fmonth_14 = listForecasts[14].fmonth;
let fmonth_15 = listForecasts[15].fmonth;
let fmonth_16 = listForecasts[16].fmonth;
let fmonth_17 = listForecasts[17].fmonth;
let fmonth_18 = listForecasts[18].fmonth;
let fmonth_19 = listForecasts[19].fmonth;
let fmonth_20 = listForecasts[20].fmonth;
let fmonth_21 = listForecasts[21].fmonth;
let fmonth_22 = listForecasts[22].fmonth;
let fmonth_23 = listForecasts[23].fmonth;
let fmonth_24 = listForecasts[24].fmonth;
let fmonth_25 = listForecasts[25].fmonth;
let fmonth_26 = listForecasts[26].fmonth;
let fmonth_27 = listForecasts[27].fmonth;
let fmonth_28 = listForecasts[28].fmonth;
let fmonth_29 = listForecasts[29].fmonth;
let fmonth_30 = listForecasts[30].fmonth;
let fmonth_31 = listForecasts[31].fmonth;
let fmonth_32 = listForecasts[32].fmonth;
let fmonth_33 = listForecasts[33].fmonth;
let fmonth_34 = listForecasts[34].fmonth;
let fmonth_35 = listForecasts[35].fmonth;
let fmonth_36 = listForecasts[36].fmonth;
let fmonth_37 = listForecasts[37].fmonth;
let fmonth_38 = listForecasts[38].fmonth;
let fmonth_39 = listForecasts[39].fmonth;
let fdate_00 = listForecasts[0].fdate;
let fdate_01 = listForecasts[1].fdate;
let fdate_02 = listForecasts[2].fdate;
let fdate_03 = listForecasts[3].fdate;
let fdate_04 = listForecasts[4].fdate;
let fdate_05 = listForecasts[5].fdate;
let fdate_06 = listForecasts[6].fdate;
let fdate_07 = listForecasts[7].fdate;
let fdate_08 = listForecasts[8].fdate;
let fdate_09 = listForecasts[9].fdate;
let fdate_10 = listForecasts[10].fdate;
let fdate_11 = listForecasts[11].fdate;
let fdate_12 = listForecasts[12].fdate;
let fdate_13 = listForecasts[13].fdate;
let fdate_14 = listForecasts[14].fdate;
let fdate_15 = listForecasts[15].fdate;
let fdate_16 = listForecasts[16].fdate;
let fdate_17 = listForecasts[17].fdate;
let fdate_18 = listForecasts[18].fdate;
let fdate_19 = listForecasts[19].fdate;
let fdate_20 = listForecasts[20].fdate;
let fdate_21 = listForecasts[21].fdate;
let fdate_22 = listForecasts[22].fdate;
let fdate_23 = listForecasts[23].fdate;
let fdate_24 = listForecasts[24].fdate;
let fdate_25 = listForecasts[25].fdate;
let fdate_26 = listForecasts[26].fdate;
let fdate_27 = listForecasts[27].fdate;
let fdate_28 = listForecasts[28].fdate;
let fdate_29 = listForecasts[29].fdate;
let fdate_30 = listForecasts[30].fdate;
let fdate_31 = listForecasts[31].fdate;
let fdate_32 = listForecasts[32].fdate;
let fdate_33 = listForecasts[33].fdate;
let fdate_34 = listForecasts[34].fdate;
let fdate_35 = listForecasts[35].fdate;
let fdate_36 = listForecasts[36].fdate;
let fdate_37 = listForecasts[37].fdate;
let fdate_38 = listForecasts[38].fdate;
let fdate_39 = listForecasts[39].fdate;
let fhours_00 = listForecasts[0].fhours;
let fhours_01 = listForecasts[1].fhours;
let fhours_02 = listForecasts[2].fhours;
let fhours_03 = listForecasts[3].fhours;
let fhours_04 = listForecasts[4].fhours;
let fhours_05 = listForecasts[5].fhours;
let fhours_06 = listForecasts[6].fhours;
let fhours_07 = listForecasts[7].fhours;
let fhours_08 = listForecasts[8].fhours;
let fhours_09 = listForecasts[9].fhours;
let fhours_10 = listForecasts[10].fhours;
let fhours_11 = listForecasts[11].fhours;
let fhours_12 = listForecasts[12].fhours;
let fhours_13 = listForecasts[13].fhours;
let fhours_14 = listForecasts[14].fhours;
let fhours_15 = listForecasts[15].fhours;
let fhours_16 = listForecasts[16].fhours;
let fhours_17 = listForecasts[17].fhours;
let fhours_18 = listForecasts[18].fhours;
let fhours_19 = listForecasts[19].fhours;
let fhours_20 = listForecasts[20].fhours;
let fhours_21 = listForecasts[21].fhours;
let fhours_22 = listForecasts[22].fhours;
let fhours_23 = listForecasts[23].fhours;
let fhours_24 = listForecasts[24].fhours;
let fhours_25 = listForecasts[25].fhours;
let fhours_26 = listForecasts[26].fhours;
let fhours_27 = listForecasts[27].fhours;
let fhours_28 = listForecasts[28].fhours;
let fhours_29 = listForecasts[29].fhours;
let fhours_30 = listForecasts[30].fhours;
let fhours_31 = listForecasts[31].fhours;
let fhours_32 = listForecasts[32].fhours;
let fhours_33 = listForecasts[33].fhours;
let fhours_34 = listForecasts[34].fhours;
let fhours_35 = listForecasts[35].fhours;
let fhours_36 = listForecasts[36].fhours;
let fhours_37 = listForecasts[37].fhours;
let fhours_38 = listForecasts[38].fhours;
let fhours_39 = listForecasts[39].fhours;
let fmins_00 = listForecasts[0].fmins;
let fmins_01 = listForecasts[1].fmins;
let fmins_02 = listForecasts[2].fmins;
let fmins_03 = listForecasts[3].fmins;
let fmins_04 = listForecasts[4].fmins;
let fmins_05 = listForecasts[5].fmins;
let fmins_06 = listForecasts[6].fmins;
let fmins_07 = listForecasts[7].fmins;
let fmins_08 = listForecasts[8].fmins;
let fmins_09 = listForecasts[9].fmins;
let fmins_10 = listForecasts[10].fmins;
let fmins_11 = listForecasts[11].fmins;
let fmins_12 = listForecasts[12].fmins;
let fmins_13 = listForecasts[13].fmins;
let fmins_14 = listForecasts[14].fmins;
let fmins_15 = listForecasts[15].fmins;
let fmins_16 = listForecasts[16].fmins;
let fmins_17 = listForecasts[17].fmins;
let fmins_18 = listForecasts[18].fmins;
let fmins_19 = listForecasts[19].fmins;
let fmins_20 = listForecasts[20].fmins;
let fmins_21 = listForecasts[21].fmins;
let fmins_22 = listForecasts[22].fmins;
let fmins_23 = listForecasts[23].fmins;
let fmins_24 = listForecasts[24].fmins;
let fmins_25 = listForecasts[25].fmins;
let fmins_26 = listForecasts[26].fmins;
let fmins_27 = listForecasts[27].fmins;
let fmins_28 = listForecasts[28].fmins;
let fmins_29 = listForecasts[29].fmins;
let fmins_30 = listForecasts[30].fmins;
let fmins_31 = listForecasts[31].fmins;
let fmins_32 = listForecasts[32].fmins;
let fmins_33 = listForecasts[33].fmins;
let fmins_34 = listForecasts[34].fmins;
let fmins_35 = listForecasts[35].fmins;
let fmins_36 = listForecasts[36].fmins;
let fmins_37 = listForecasts[37].fmins;
let fmins_38 = listForecasts[38].fmins;
let fmins_39 = listForecasts[39].fmins;
let fsecs_00 = listForecasts[0].fsecs;
let fsecs_01 = listForecasts[1].fsecs;
let fsecs_02 = listForecasts[2].fsecs;
let fsecs_03 = listForecasts[3].fsecs;
let fsecs_04 = listForecasts[4].fsecs;
let fsecs_05 = listForecasts[5].fsecs;
let fsecs_06 = listForecasts[6].fsecs;
let fsecs_07 = listForecasts[7].fsecs;
let fsecs_08 = listForecasts[8].fsecs;
let fsecs_09 = listForecasts[9].fsecs;
let fsecs_10 = listForecasts[10].fsecs;
let fsecs_11 = listForecasts[11].fsecs;
let fsecs_12 = listForecasts[12].fsecs;
let fsecs_13 = listForecasts[13].fsecs;
let fsecs_14 = listForecasts[14].fsecs;
let fsecs_15 = listForecasts[15].fsecs;
let fsecs_16 = listForecasts[16].fsecs;
let fsecs_17 = listForecasts[17].fsecs;
let fsecs_18 = listForecasts[18].fsecs;
let fsecs_19 = listForecasts[19].fsecs;
let fsecs_20 = listForecasts[20].fsecs;
let fsecs_21 = listForecasts[21].fsecs;
let fsecs_22 = listForecasts[22].fsecs;
let fsecs_23 = listForecasts[23].fsecs;
let fsecs_24 = listForecasts[24].fsecs;
let fsecs_25 = listForecasts[25].fsecs;
let fsecs_26 = listForecasts[26].fsecs;
let fsecs_27 = listForecasts[27].fsecs;
let fsecs_28 = listForecasts[28].fsecs;
let fsecs_29 = listForecasts[29].fsecs;
let fsecs_30 = listForecasts[30].fsecs;
let fsecs_31 = listForecasts[31].fsecs;
let fsecs_32 = listForecasts[32].fsecs;
let fsecs_33 = listForecasts[33].fsecs;
let fsecs_34 = listForecasts[34].fsecs;
let fsecs_35 = listForecasts[35].fsecs;
let fsecs_36 = listForecasts[36].fsecs;
let fsecs_37 = listForecasts[37].fsecs;
let fsecs_38 = listForecasts[38].fsecs;
let fsecs_39 = listForecasts[39].fsecs;
let dt_localtime_00 = listForecasts[0].dt_localtime;
let dt_localtime_01 = listForecasts[1].dt_localtime;
let dt_localtime_02 = listForecasts[2].dt_localtime;
let dt_localtime_03 = listForecasts[3].dt_localtime;
let dt_localtime_04 = listForecasts[4].dt_localtime;
let dt_localtime_05 = listForecasts[5].dt_localtime;
let dt_localtime_06 = listForecasts[6].dt_localtime;
let dt_localtime_07 = listForecasts[7].dt_localtime;
let dt_localtime_08 = listForecasts[8].dt_localtime;
let dt_localtime_09 = listForecasts[9].dt_localtime;
let dt_localtime_10 = listForecasts[10].dt_localtime;
let dt_localtime_11 = listForecasts[11].dt_localtime;
let dt_localtime_12 = listForecasts[12].dt_localtime;
let dt_localtime_13 = listForecasts[13].dt_localtime;
let dt_localtime_14 = listForecasts[14].dt_localtime;
let dt_localtime_15 = listForecasts[15].dt_localtime;
let dt_localtime_16 = listForecasts[16].dt_localtime;
let dt_localtime_17 = listForecasts[17].dt_localtime;
let dt_localtime_18 = listForecasts[18].dt_localtime;
let dt_localtime_19 = listForecasts[19].dt_localtime;
let dt_localtime_20 = listForecasts[20].dt_localtime;
let dt_localtime_21 = listForecasts[21].dt_localtime;
let dt_localtime_22 = listForecasts[22].dt_localtime;
let dt_localtime_23 = listForecasts[23].dt_localtime;
let dt_localtime_24 = listForecasts[24].dt_localtime;
let dt_localtime_25 = listForecasts[25].dt_localtime;
let dt_localtime_26 = listForecasts[26].dt_localtime;
let dt_localtime_27 = listForecasts[27].dt_localtime;
let dt_localtime_28 = listForecasts[28].dt_localtime;
let dt_localtime_29 = listForecasts[29].dt_localtime;
let dt_localtime_30 = listForecasts[30].dt_localtime;
let dt_localtime_31 = listForecasts[31].dt_localtime;
let dt_localtime_32 = listForecasts[32].dt_localtime;
let dt_localtime_33 = listForecasts[33].dt_localtime;
let dt_localtime_34 = listForecasts[34].dt_localtime;
let dt_localtime_35 = listForecasts[35].dt_localtime;
let dt_localtime_36 = listForecasts[36].dt_localtime;
let dt_localtime_37 = listForecasts[37].dt_localtime;
let dt_localtime_38 = listForecasts[38].dt_localtime;
let dt_localtime_39 = listForecasts[39].dt_localtime;
let d_localtime_00 = listForecasts[0].d_localtime;
let d_localtime_01 = listForecasts[1].d_localtime;
let d_localtime_02 = listForecasts[2].d_localtime;
let d_localtime_03 = listForecasts[3].d_localtime;
let d_localtime_04 = listForecasts[4].d_localtime;
let d_localtime_05 = listForecasts[5].d_localtime;
let d_localtime_06 = listForecasts[6].d_localtime;
let d_localtime_07 = listForecasts[7].d_localtime;
let d_localtime_08 = listForecasts[8].d_localtime;
let d_localtime_09 = listForecasts[9].d_localtime;
let d_localtime_10 = listForecasts[10].d_localtime;
let d_localtime_11 = listForecasts[11].d_localtime;
let d_localtime_12 = listForecasts[12].d_localtime;
let d_localtime_13 = listForecasts[13].d_localtime;
let d_localtime_14 = listForecasts[14].d_localtime;
let d_localtime_15 = listForecasts[15].d_localtime;
let d_localtime_16 = listForecasts[16].d_localtime;
let d_localtime_17 = listForecasts[17].d_localtime;
let d_localtime_18 = listForecasts[18].d_localtime;
let d_localtime_19 = listForecasts[19].d_localtime;
let d_localtime_20 = listForecasts[20].d_localtime;
let d_localtime_21 = listForecasts[21].d_localtime;
let d_localtime_22 = listForecasts[22].d_localtime;
let d_localtime_23 = listForecasts[23].d_localtime;
let d_localtime_24 = listForecasts[24].d_localtime;
let d_localtime_25 = listForecasts[25].d_localtime;
let d_localtime_26 = listForecasts[26].d_localtime;
let d_localtime_27 = listForecasts[27].d_localtime;
let d_localtime_28 = listForecasts[28].d_localtime;
let d_localtime_29 = listForecasts[29].d_localtime;
let d_localtime_30 = listForecasts[30].d_localtime;
let d_localtime_31 = listForecasts[31].d_localtime;
let d_localtime_32 = listForecasts[32].d_localtime;
let d_localtime_33 = listForecasts[33].d_localtime;
let d_localtime_34 = listForecasts[34].d_localtime;
let d_localtime_35 = listForecasts[35].d_localtime;
let d_localtime_36 = listForecasts[36].d_localtime;
let d_localtime_37 = listForecasts[37].d_localtime;
let d_localtime_38 = listForecasts[38].d_localtime;
let d_localtime_39 = listForecasts[39].d_localtime;
let ds_localtime_00 = listForecasts[0].ds_localtime;
let ds_localtime_01 = listForecasts[1].ds_localtime;
let ds_localtime_02 = listForecasts[2].ds_localtime;
let ds_localtime_03 = listForecasts[3].ds_localtime;
let ds_localtime_04 = listForecasts[4].ds_localtime;
let ds_localtime_05 = listForecasts[5].ds_localtime;
let ds_localtime_06 = listForecasts[6].ds_localtime;
let ds_localtime_07 = listForecasts[7].ds_localtime;
let ds_localtime_08 = listForecasts[8].ds_localtime;
let ds_localtime_09 = listForecasts[9].ds_localtime;
let ds_localtime_10 = listForecasts[10].ds_localtime;
let ds_localtime_11 = listForecasts[11].ds_localtime;
let ds_localtime_12 = listForecasts[12].ds_localtime;
let ds_localtime_13 = listForecasts[13].ds_localtime;
let ds_localtime_14 = listForecasts[14].ds_localtime;
let ds_localtime_15 = listForecasts[15].ds_localtime;
let ds_localtime_16 = listForecasts[16].ds_localtime;
let ds_localtime_17 = listForecasts[17].ds_localtime;
let ds_localtime_18 = listForecasts[18].ds_localtime;
let ds_localtime_19 = listForecasts[19].ds_localtime;
let ds_localtime_20 = listForecasts[20].ds_localtime;
let ds_localtime_21 = listForecasts[21].ds_localtime;
let ds_localtime_22 = listForecasts[22].ds_localtime;
let ds_localtime_23 = listForecasts[23].ds_localtime;
let ds_localtime_24 = listForecasts[24].ds_localtime;
let ds_localtime_25 = listForecasts[25].ds_localtime;
let ds_localtime_26 = listForecasts[26].ds_localtime;
let ds_localtime_27 = listForecasts[27].ds_localtime;
let ds_localtime_28 = listForecasts[28].ds_localtime;
let ds_localtime_29 = listForecasts[29].ds_localtime;
let ds_localtime_30 = listForecasts[30].ds_localtime;
let ds_localtime_31 = listForecasts[31].ds_localtime;
let ds_localtime_32 = listForecasts[32].ds_localtime;
let ds_localtime_33 = listForecasts[33].ds_localtime;
let ds_localtime_34 = listForecasts[34].ds_localtime;
let ds_localtime_35 = listForecasts[35].ds_localtime;
let ds_localtime_36 = listForecasts[36].ds_localtime;
let ds_localtime_37 = listForecasts[37].ds_localtime;
let ds_localtime_38 = listForecasts[38].ds_localtime;
let ds_localtime_39 = listForecasts[39].ds_localtime;
let t_localtime_00 = listForecasts[0].t_localtime;
let t_localtime_01 = listForecasts[1].t_localtime;
let t_localtime_02 = listForecasts[2].t_localtime;
let t_localtime_03 = listForecasts[3].t_localtime;
let t_localtime_04 = listForecasts[4].t_localtime;
let t_localtime_05 = listForecasts[5].t_localtime;
let t_localtime_06 = listForecasts[6].t_localtime;
let t_localtime_07 = listForecasts[7].t_localtime;
let t_localtime_08 = listForecasts[8].t_localtime;
let t_localtime_09 = listForecasts[9].t_localtime;
let t_localtime_10 = listForecasts[10].t_localtime;
let t_localtime_11 = listForecasts[11].t_localtime;
let t_localtime_12 = listForecasts[12].t_localtime;
let t_localtime_13 = listForecasts[13].t_localtime;
let t_localtime_14 = listForecasts[14].t_localtime;
let t_localtime_15 = listForecasts[15].t_localtime;
let t_localtime_16 = listForecasts[16].t_localtime;
let t_localtime_17 = listForecasts[17].t_localtime;
let t_localtime_18 = listForecasts[18].t_localtime;
let t_localtime_19 = listForecasts[19].t_localtime;
let t_localtime_20 = listForecasts[20].t_localtime;
let t_localtime_21 = listForecasts[21].t_localtime;
let t_localtime_22 = listForecasts[22].t_localtime;
let t_localtime_23 = listForecasts[23].t_localtime;
let t_localtime_24 = listForecasts[24].t_localtime;
let t_localtime_25 = listForecasts[25].t_localtime;
let t_localtime_26 = listForecasts[26].t_localtime;
let t_localtime_27 = listForecasts[27].t_localtime;
let t_localtime_28 = listForecasts[28].t_localtime;
let t_localtime_29 = listForecasts[29].t_localtime;
let t_localtime_30 = listForecasts[30].t_localtime;
let t_localtime_31 = listForecasts[31].t_localtime;
let t_localtime_32 = listForecasts[32].t_localtime;
let t_localtime_33 = listForecasts[33].t_localtime;
let t_localtime_34 = listForecasts[34].t_localtime;
let t_localtime_35 = listForecasts[35].t_localtime;
let t_localtime_36 = listForecasts[36].t_localtime;
let t_localtime_37 = listForecasts[37].t_localtime;
let t_localtime_38 = listForecasts[38].t_localtime;
let t_localtime_39 = listForecasts[39].t_localtime;
let ts_localtime_00 = listForecasts[0].ts_localtime;