mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 17:54:30 +08:00
add explicit type for string-based datetimes, replacing third-party datetime type with internal DateTime type
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { UnixTimeRange } from './datetime.ts';
|
||||
import type { TextualYearMonth, UnixTimeRange } from './datetime.ts';
|
||||
|
||||
export class FiscalYearStart {
|
||||
public static readonly JanuaryFirstDay = new FiscalYearStart(1, 1);
|
||||
@@ -75,8 +75,8 @@ export class FiscalYearStart {
|
||||
return FiscalYearStart.of(month, day);
|
||||
}
|
||||
|
||||
public toMonthDashDayString(): string {
|
||||
return `${this.month.toString().padStart(2, '0')}-${this.day.toString().padStart(2, '0')}`;
|
||||
public toMonthDashDayString(): TextualYearMonth {
|
||||
return `${this.month.toString().padStart(2, '0')}-${this.day.toString().padStart(2, '0')}` as TextualYearMonth;
|
||||
}
|
||||
|
||||
private static isValidFiscalYearMonthDay(month: number, day: number): boolean {
|
||||
|
||||
Reference in New Issue
Block a user