mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 07:57:33 +08:00
support custom chart sorting order
This commit is contained in:
@@ -291,6 +291,10 @@ export class WeekDay implements TypeAndName {
|
||||
WeekDay.allInstancesByName[name] = this;
|
||||
}
|
||||
|
||||
public getDisplayOrder(firstDayOfWeek: WeekDayValue): number {
|
||||
return (this.type - firstDayOfWeek + 7) % 7;
|
||||
}
|
||||
|
||||
public static values(): WeekDay[] {
|
||||
return WeekDay.allInstances;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user