Fixed greetings
This commit is contained in:
parent
b56bb5706a
commit
ea1acd1f9e
@ -1,11 +1,6 @@
|
||||
// Get the hour
|
||||
if (today === undefined) {
|
||||
const today = new Date();
|
||||
}
|
||||
|
||||
if (today === undefined) {
|
||||
const hour = today.getHours();
|
||||
}
|
||||
const today = new Date();
|
||||
const hour = today.getHours();
|
||||
|
||||
// Here you can change your name
|
||||
const name = 'John Doe';
|
||||
|
@ -40,7 +40,8 @@ function getWeather(latitude, longitude) {
|
||||
})
|
||||
.then(function (data) {
|
||||
let celsius = Math.floor(data.main.temp - KELVIN);
|
||||
weather.temperature.value = (tempUnit == 'C') ? celsius : (celsius * 9/5) + 32;
|
||||
weather.temperature.value =
|
||||
tempUnit == 'C' ? celsius : (celsius * 9) / 5 + 32;
|
||||
weather.description = data.weather[0].description;
|
||||
weather.iconId = data.weather[0].icon;
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user