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