mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 07:27:33 +08:00
reconciliation statement page / dialog supports account balance trends chart (#184)
This commit is contained in:
@@ -20,6 +20,12 @@ export interface YearMonthRange {
|
||||
readonly endYearMonth: Year0BasedMonth;
|
||||
}
|
||||
|
||||
export interface YearMonthDay {
|
||||
readonly year: number;
|
||||
readonly month: number; // 1-based (1 = January, 12 = December)
|
||||
readonly day: number;
|
||||
}
|
||||
|
||||
export interface TimeRange {
|
||||
readonly minTime: number;
|
||||
readonly maxTime: number;
|
||||
@@ -136,6 +142,26 @@ export class YearMonthUnixTime implements Year0BasedMonth, UnixTimeRange {
|
||||
}
|
||||
}
|
||||
|
||||
export class YearMonthDayUnixTime implements YearMonthDay, UnixTimeRange {
|
||||
public readonly year: number;
|
||||
public readonly month: number;
|
||||
public readonly day: number;
|
||||
public readonly minUnixTime: number;
|
||||
public readonly maxUnixTime: number;
|
||||
|
||||
private constructor(year: number, month: number, day: number, minUnixTime: number, maxUnixTime: number) {
|
||||
this.year = year;
|
||||
this.month = month;
|
||||
this.day = day
|
||||
this.minUnixTime = minUnixTime;
|
||||
this.maxUnixTime = maxUnixTime;
|
||||
}
|
||||
|
||||
public static of(yearMonthDay: YearMonthDay, minUnixTime: number, maxUnixTime: number): YearMonthDayUnixTime {
|
||||
return new YearMonthDayUnixTime(yearMonthDay.year, yearMonthDay.month, yearMonthDay.day, minUnixTime, maxUnixTime);
|
||||
}
|
||||
}
|
||||
|
||||
export type MonthValue = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
||||
|
||||
export class Month {
|
||||
|
||||
Reference in New Issue
Block a user