use and display the Gregorian calendar when calculating months, quarters, years, and fiscal years

This commit is contained in:
MaysWind
2025-09-08 00:32:30 +08:00
parent 5591abdb3b
commit 642e51bc0c
14 changed files with 120 additions and 104 deletions
@@ -37,7 +37,7 @@ function getFiscalYearStartFromProps(props: CommonFiscalYearStartSelectionProps)
}
export function useFiscalYearStartSelectionBase(props: CommonFiscalYearStartSelectionProps) {
const { formatGregorianCalendarMonthDashDayToLongMonthDay } = useI18n();
const { getCalendarLongMonthDayFromGregorianCalendarTextualMonthDay } = useI18n();
const disabledDates = (date: Date) => {
// Disable February 29 (leap day)
@@ -71,7 +71,7 @@ export function useFiscalYearStartSelectionBase(props: CommonFiscalYearStartSele
fiscalYearStart = FiscalYearStart.Default;
}
return formatGregorianCalendarMonthDashDayToLongMonthDay(fiscalYearStart.toMonthDashDayString());
return getCalendarLongMonthDayFromGregorianCalendarTextualMonthDay(fiscalYearStart.toMonthDashDayString());
});
const allowedMinDate = computed<Date>(() => getLocalDatetimeFromUnixTime(getThisYearFirstUnixTime()));