UBER-615 Redesign hr schedule month view (#3538)

Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2023-08-01 17:39:26 +07:00
committed by GitHub
parent 746d8a1c41
commit 424c546089
8 changed files with 637 additions and 430 deletions
+15
View File
@@ -39,3 +39,18 @@ export function fromTzDate (tzDate: TzDate): number {
export function tzDateEqual (tzDate: TzDate, tzDate2: TzDate): boolean {
return tzDate.year === tzDate2.year && tzDate.month === tzDate2.month && tzDate.day === tzDate2.day
}
/**
* @public
*/
export function tzDateCompare (tzDate1: TzDate, tzDate2: TzDate): number {
if (tzDate1.year === tzDate2.year) {
if (tzDate1.month === tzDate2.month) {
return tzDate1.day - tzDate2.day
} else {
return tzDate1.month - tzDate2.month
}
} else {
return tzDate1.year - tzDate2.year
}
}