diff --git a/packages/main/src/Calendar.ts b/packages/main/src/Calendar.ts index a028e8519573..a362831dd106 100644 --- a/packages/main/src/Calendar.ts +++ b/packages/main/src/Calendar.ts @@ -572,7 +572,7 @@ class Calendar extends CalendarPart { const secondYearFormat = DateFormat.getDateInstance({ format: "y", calendarType: this._secondaryCalendarType }); const dateInSecType = transformDateToSecondaryType(this._primaryCalendarType, this._secondaryCalendarType, this._timestamp); const secondMonthInfo = convertMonthNumbersToMonthNames(dateInSecType.firstDate.getMonth(), dateInSecType.lastDate.getMonth(), this._secondaryCalendarType); - const secondYearText = secondYearFormat.format(localDate, true); + const secondYearText = secondYearFormat.format(localDate); return { yearButtonText: secondYearText, diff --git a/packages/main/src/YearPicker.ts b/packages/main/src/YearPicker.ts index 92cec5ee585f..eb8042e8aae8 100644 --- a/packages/main/src/YearPicker.ts +++ b/packages/main/src/YearPicker.ts @@ -190,8 +190,8 @@ class YearPicker extends CalendarPart implements ICalendarPicker { if (this.hasSecondaryCalendarType) { tempDateInSecType = transformDateToSecondaryType(this._primaryCalendarType, this.secondaryCalendarType, timestamp, true); textInSecType = tempDateInSecType.firstDate.getYear() === tempDateInSecType.lastDate.getYear() - ? `${oYearFormatInSecType.format(tempDateInSecType.firstDate.toLocalJSDate(), true)}` - : `${oYearFormatInSecType.format(tempDateInSecType.firstDate.toLocalJSDate(), true)} - ${oYearFormatInSecType.format(tempDateInSecType.lastDate.toLocalJSDate(), true)}`; + ? `${oYearFormatInSecType.format(tempDateInSecType.firstDate.toLocalJSDate())}` + : `${oYearFormatInSecType.format(tempDateInSecType.firstDate.toLocalJSDate())} - ${oYearFormatInSecType.format(tempDateInSecType.lastDate.toLocalJSDate())}`; } const year: Year = {