Skip to content

Fix DateTimeFormat comments for year pattern (#95629) #95650

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

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ Patterns Format Description Example

"y" "0" two digit year (year % 100) w/o leading zero 0
"yy" "00" two digit year (year % 100) with leading zero 00
"yyy" "D3" year 2000
"yyyy" "D4" year 2000
"yyyyy" "D5" year 2000
"yyy" "D3" year with leading zeroes 2000
"yyyy" "D4" year with leading zeroes 2000
"yyyyy" "D5" year with leading zeroes 02000
...

"z" "+0;-0" timezone offset w/o leading zero -8
Expand Down Expand Up @@ -618,7 +618,7 @@ private static void FormatCustomized<TChar>(
// Notes about OS behavior:
// y: Always print (year % 100). No leading zero.
// yy: Always print (year % 100) with leading zero.
// yyy/yyyy/yyyyy/... : Print year value. No leading zero.
// yyy/yyyy/yyyyy/... : Print year value. With leading zeros.

int year = cal.GetYear(dateTime);
tokenLen = ParseRepeatPattern(format, i, ch);
Expand Down