Fixed greetings

This commit is contained in:
Miguel R. Ávila 2021-01-03 20:54:21 -06:00
parent b56bb5706a
commit ea1acd1f9e
4 changed files with 84 additions and 88 deletions

View File

@ -1,11 +1,6 @@
// Get the hour
if (today === undefined) {
const today = new Date();
}
if (today === undefined) {
const hour = today.getHours();
}
// Here you can change your name
const name = 'John Doe';

View File

@ -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;
})