Files
everything-is-suitable/everything-is-suitable-uniapp/test-year-switch.ts
T
张翔 08ea5fbe98 feat(admin): 添加用户管理相关文件
添加用户管理视图、API和状态管理文件
2026-03-28 14:37:29 +08:00

17 lines
567 B
TypeScript

import lunarUtils from './src/utils/lunarUtils'
const testDates = [
{ year: 2025, month: 1, day: 28 },
{ year: 2025, month: 1, day: 29 },
{ year: 2025, month: 1, day: 30 },
{ year: 2026, month: 2, day: 16 },
{ year: 2026, month: 2, day: 17 },
{ year: 2026, month: 2, day: 18 }
]
console.log('=== 农历年切换测试 ===')
testDates.forEach(date => {
const lunarDate = lunarUtils.solarToLunar(date.year, date.month, date.day)
console.log(`${date.year}-${date.month}-${date.day} => ${lunarDate.yearStr} ${lunarDate.monthStr}${lunarDate.dayStr}`)
})