Merge pull request #32 from LithiumNL/patch-1

Update weather.js
This commit is contained in:
Michael Teeuw 2015-11-01 18:45:32 +01:00
commit 067ef7ecba

View File

@ -84,14 +84,14 @@ weather.updateCurrentWeather = function () {
$(this.temperatureLocation).updateWithText(_newTempHtml, this.fadeInterval);
var _now = moment(),
var _now = moment().format('HH:mm'),
_sunrise = moment(data.sys.sunrise*1000).format('HH:mm'),
_sunset = moment(data.sys.sunset*1000).format('HH:mm');
var _newWindHtml = '<span class="wi wi-strong-wind xdimmed"></span> ' + this.kmh2Beaufort(_wind),
_newSunHtml = '<span class="wi wi-sunrise xdimmed"></span> ' + _sunrise;
if (_sunrise < _now && _sunset > now) {
if (_sunrise < _now && _sunset > _now) {
_newSunHtml = '<span class="wi wi-sunset xdimmed"></span> ' + _sunset;
}
@ -165,4 +165,4 @@ weather.init = function () {
this.updateWeatherForecast();
}.bind(this), this.updateInterval);
}
}