feat(calendar): add isSameLocalDay function and integrate it into calendar components
This commit is contained in:
@@ -12,6 +12,10 @@ export function startOfWeek(date: Date) {
|
||||
return ret
|
||||
}
|
||||
|
||||
export function isSameLocalDay(a: Date, b: Date) {
|
||||
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate()
|
||||
}
|
||||
|
||||
export function startOfMonth(date: Date) {
|
||||
const ret = startOfDay(date)
|
||||
ret.setDate(1)
|
||||
|
||||
Reference in New Issue
Block a user