mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2024-12-01 09:44:44 +08:00
fix: 轻雪天气星期几显示错误
This commit is contained in:
parent
c063c69dea
commit
269dd5ced2
@ -80,11 +80,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) % 7]])
|
||||||
}
|
}
|
||||||
weatherDaily['daily'].forEach(
|
weatherDaily['daily'].forEach(
|
||||||
(item, index) => {
|
(item, index) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user