项目全局使用formatDate方法移除parseTime方法

This commit is contained in:
shizhong
2023-06-13 11:03:33 +08:00
parent 8be4f31a1b
commit ba4cc02bfd
8 changed files with 24 additions and 69 deletions

View File

@ -87,8 +87,7 @@ export function getWeek(dateTime: Date): number {
if (dayOfWeek != 0) spendDay = 7 - dayOfWeek + 1
firstDay = new Date(temptTime.getFullYear(), 0, 1 + spendDay)
const d = Math.ceil((temptTime.valueOf() - firstDay.valueOf()) / 86400000)
const result = Math.ceil(d / 7)
return result
return Math.ceil(d / 7)
}
/**