Update lib.js
This commit is contained in:
parent
4d5906d066
commit
b839dbb22a
@ -10,7 +10,7 @@ export const getTemp = (temp) => {
|
||||
export const getWeatherSymbol = (weatherCode) => {
|
||||
const dt = new Date();
|
||||
const hour = dt.getHours();
|
||||
if (hour < 7 || hour > 21) {
|
||||
if (hour <= 7 || hour >= 20) {
|
||||
return NIGHT_WEATHER_SYMBOL[WWO_CODE[weatherCode]];
|
||||
}
|
||||
return WEATHER_SYMBOL[WWO_CODE[weatherCode]];
|
||||
@ -160,4 +160,4 @@ const NIGHT_WEATHER_SYMBOL = {
|
||||
"ThunderyShowers": "thunderstorm",
|
||||
"ThunderySnowShowers": "thunderstorm",
|
||||
"VeryCloudy": "cloud",
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user