-
Notifications
You must be signed in to change notification settings - Fork 273
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
Conversation
Hi @Todor-ads small remark, the convention for cmt msg is: |
packages/main/src/Calendar.ts
Outdated
@@ -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); |
There was a problem hiding this comment.
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
packages/main/src/YearPicker.ts
Outdated
? `${oYearFormatInSecType.format(tempDateInSecType.firstDate.toLocalJSDate(), false)}` | ||
: `${oYearFormatInSecType.format(tempDateInSecType.firstDate.toLocalJSDate(), false)} - ${oYearFormatInSecType.format(tempDateInSecType.lastDate.toLocalJSDate(), false)}`; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add test
Let us merge the new calendar tests PR first (#10682) and you can write the test there. |
There was a problem hiding this 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
We agreed to add tests later and to merge now.
closes: #10633