|
|
|
@ -165,9 +165,9 @@ fetch(forecastUrl)
|
|
|
|
|
// document.getElementById('forecastWeek' + number).innerText = formatWeek(currentDate);
|
|
|
|
|
document.getElementById('forecastDate' + number).innerText = formatDate(currentDate);
|
|
|
|
|
document.getElementById('forecastTemperature' + number).innerText =
|
|
|
|
|
Math.round(firstDay.main.temp) + '~' + Math.round(lastDay.main.temp) + '°C';
|
|
|
|
|
Math.round(firstDay.main.temp) + ' ~ ' + Math.round(lastDay.main.temp) + '°C';
|
|
|
|
|
document.getElementById('forecastFahrenheit' + number).innerText =
|
|
|
|
|
Math.round(convertToF(firstDay.main.temp)) + '~' + Math.round(convertToF(lastDay.main.temp)) + '℉';
|
|
|
|
|
Math.round(convertToF(firstDay.main.temp)) + ' ~ ' + Math.round(convertToF(lastDay.main.temp)) + '℉';
|
|
|
|
|
document.getElementById('forecastIcon' + number).src = 'https://data.chinahighlights.com/image/weather/icon-weather/' + firstDay.weather[0].icon + '.png';
|
|
|
|
|
document.getElementById('forecastCondition' + number).innerText = firstDay.weather[0].main;
|
|
|
|
|
document.getElementById('forecastHumidity' + number).innerText = 'Humidity: ' + firstDay.main.humidity + '%';
|
|
|
|
|