更新天气月份格式

hotfix/paypal-note
LiaoYijun 4 years ago
parent 70324b068c
commit 985fbb5a48

@ -88,9 +88,10 @@
// https://openweathermap.org/forecast5
var cityId = window.ch_forecast_city.id;
var weekMap = new Array("SUN.", "MON.", "TUE.", "WED.", "THU.", "FRI.", "SAT.");
var monthMap = new Array("Jan.", "Feb.", "Mar.", "Apr.", "May.", "Jun.", "Jul.", "Aug.", "Sept.", "Oct.", "Nov.", "Dec.");
function formatDate(date) {
return (date.getMonth() + 1) + '.' + date.getDate();
return monthMap[(date.getMonth())] + date.getDate() + '.';
}
function formatWeek(date) {
return weekMap[date.getDay()];

Loading…
Cancel
Save