Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui5-calendar): using the correct parameter for UTC when formatting a date #10713

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

Todor-ads
Copy link
Member

@Todor-ads Todor-ads commented Jan 30, 2025

closes: #10633

@ilhan007
Copy link
Member

Hi @Todor-ads small remark, the convention for cmt msg is: fix(ui5-calendar):, not fix:(ui5-calendar) -

@Todor-ads Todor-ads changed the title fix:(ui5-calendar) - using the correct parameter for UTC when formatting a date fix(ui5-calendar): using the correct parameter for UTC when formatting a date Jan 30, 2025
@@ -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, false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false is the default value

Comment on lines 193 to 194
? `${oYearFormatInSecType.format(tempDateInSecType.firstDate.toLocalJSDate(), false)}`
: `${oYearFormatInSecType.format(tempDateInSecType.firstDate.toLocalJSDate(), false)} - ${oYearFormatInSecType.format(tempDateInSecType.lastDate.toLocalJSDate(), false)}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false is the default value

@tsanislavgatev tsanislavgatev self-requested a review January 30, 2025 12:49
Copy link
Contributor

@tsanislavgatev tsanislavgatev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add test

@vladitasev
Copy link
Contributor

Let us merge the new calendar tests PR first (#10682) and you can write the test there.

Copy link
Contributor

@vladitasev vladitasev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As agreed, tests will be added in a follow-up change

@vladitasev vladitasev dismissed tsanislavgatev’s stale review January 31, 2025 09:40

We agreed to add tests later and to merge now.

@vladitasev vladitasev merged commit 9ae1f63 into main Jan 31, 2025
10 checks passed
@vladitasev vladitasev deleted the calendar-buddhist-type branch January 31, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DatePicker]: Dual Calendar displays different Year for Buddhist in Month View and Year view
4 participants