mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 17:24:26 +08:00
fix the Persian Calendar was not displayed when the calendar display type was set to Gregorian with Persian Calendar, but the date display type was not set to Persian
This commit is contained in:
@@ -1905,6 +1905,8 @@ export function useI18n() {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dateTimeFormatOptions = getDateTimeFormatOptions({ calendarType: calendarDisplayType });
|
||||||
|
|
||||||
if (calendarDisplayType === CalendarType.Chinese) {
|
if (calendarDisplayType === CalendarType.Chinese) {
|
||||||
const chineseCalendarLocaleData = getChineseCalendarLocaleData();
|
const chineseCalendarLocaleData = getChineseCalendarLocaleData();
|
||||||
const chineseDates: ChineseYearMonthDayInfo[] | undefined = getChineseYearMonthAllDayInfos(yearMonth, chineseCalendarLocaleData);
|
const chineseDates: ChineseYearMonthDayInfo[] | undefined = getChineseYearMonthAllDayInfos(yearMonth, chineseCalendarLocaleData);
|
||||||
@@ -1922,7 +1924,6 @@ export function useI18n() {
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
} else if (calendarDisplayType === CalendarType.Persian) {
|
} else if (calendarDisplayType === CalendarType.Persian) {
|
||||||
const dateTimeFormatOptions = getDateTimeFormatOptions();
|
|
||||||
const monthDays: number = getGregorianCalendarYearMonthDays(yearMonth);
|
const monthDays: number = getGregorianCalendarYearMonthDays(yearMonth);
|
||||||
const ret: CalendarAlternateDate[] = [];
|
const ret: CalendarAlternateDate[] = [];
|
||||||
|
|
||||||
@@ -1944,6 +1945,8 @@ export function useI18n() {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dateTimeFormatOptions = getDateTimeFormatOptions({ calendarType: calendarDisplayType });
|
||||||
|
|
||||||
if (calendarDisplayType === CalendarType.Chinese) {
|
if (calendarDisplayType === CalendarType.Chinese) {
|
||||||
const chineseCalendarLocaleData = getChineseCalendarLocaleData();
|
const chineseCalendarLocaleData = getChineseCalendarLocaleData();
|
||||||
const chineseDate: ChineseYearMonthDayInfo | undefined = getChineseYearMonthDayInfo(yearMonthDay, chineseCalendarLocaleData);
|
const chineseDate: ChineseYearMonthDayInfo | undefined = getChineseYearMonthDayInfo(yearMonthDay, chineseCalendarLocaleData);
|
||||||
@@ -1954,7 +1957,6 @@ export function useI18n() {
|
|||||||
|
|
||||||
return getChineseCalendarAlternateDisplayDate(chineseDate);
|
return getChineseCalendarAlternateDisplayDate(chineseDate);
|
||||||
} else if (calendarDisplayType === CalendarType.Persian) {
|
} else if (calendarDisplayType === CalendarType.Persian) {
|
||||||
const dateTimeFormatOptions = getDateTimeFormatOptions();
|
|
||||||
const dateTime = getYearMonthDayDateTime(yearMonthDay.year, yearMonthDay.month, yearMonthDay.day);
|
const dateTime = getYearMonthDayDateTime(yearMonthDay.year, yearMonthDay.month, yearMonthDay.day);
|
||||||
return getCalendarAlternateDisplayDate(dateTime, dateTimeFormatOptions);
|
return getCalendarAlternateDisplayDate(dateTime, dateTimeFormatOptions);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user