1
0
forked from bot/app

Merge remote-tracking branch 'origin/main'

This commit is contained in:
远野千束 2024-04-29 16:59:03 +08:00
commit f9317802f4

View File

@ -86,11 +86,11 @@ weatherHourly['hourly'].forEach(
let maxDailyItem = 7 let maxDailyItem = 7
// 第一和第二天用today和tomorrow后面用星期X英文小写 // 第一和第二天用today和tomorrow后面用星期X英文小写
let daysStandard = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'] let daysStandard = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']
let todayDay = new Date().getDay() let todayDay = new Date().getDay()
let days = [localData['today'], localData['tomorrow']] let days = [localData['today'], localData['tomorrow']]
for (let i = 0; i < 5; i++) { for (let i = 0; i < 5; i++) {
days.push(localData[daysStandard[(todayDay + i) % 7]]) days.push(localData[daysStandard[(todayDay+2+i) % 7]])
} }
weatherDaily['daily'].forEach( weatherDaily['daily'].forEach(
(item, index) => { (item, index) => {