Skip to content
Permalink
Browse files
8282081: java.time.DateTimeFormatter: wrong definition of symbol F
Reviewed-by: joehw, scolebourne, lancea, rriggs
  • Loading branch information
naotoj committed Mar 4, 2022
1 parent f9f9c0a commit 733c7907b0059cc734fd1aa5b8d31f9c3e2e3079
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
@@ -297,7 +297,7 @@
* <tr><th scope="row">W</th> <td>week-of-month</td> <td>number</td> <td>4</td>
* <tr><th scope="row">E</th> <td>day-of-week</td> <td>text</td> <td>Tue; Tuesday; T</td>
* <tr><th scope="row">e/c</th> <td>localized day-of-week</td> <td>number/text</td> <td>2; 02; Tue; Tuesday; T</td>
* <tr><th scope="row">F</th> <td>day-of-week-in-month</td> <td>number</td> <td>3</td>
* <tr><th scope="row">F</th> <td>aligned-week-of-month</td> <td>number</td> <td>3</td>
*
* <tr><th scope="row">a</th> <td>am-pm-of-day</td> <td>text</td> <td>PM</td>
* <tr><th scope="row">B</th> <td>period-of-day</td> <td>text</td> <td>in the morning</td>
@@ -1774,7 +1774,7 @@ public DateTimeFormatterBuilder appendOptional(DateTimeFormatter formatter) {
* D 1 appendValue(ChronoField.DAY_OF_YEAR)
* DD 2 appendValue(ChronoField.DAY_OF_YEAR, 2, 3, SignStyle.NOT_NEGATIVE)
* DDD 3 appendValue(ChronoField.DAY_OF_YEAR, 3)
* F 1 appendValue(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH)
* F 1 appendValue(ChronoField.ALIGNED_WEEK_OF_MONTH)
* g..g 1..n appendValue(JulianFields.MODIFIED_JULIAN_DAY, n, 19, SignStyle.NORMAL)
* E 1 appendText(ChronoField.DAY_OF_WEEK, TextStyle.SHORT)
* EE 2 appendText(ChronoField.DAY_OF_WEEK, TextStyle.SHORT)
@@ -2183,7 +2183,7 @@ private void parseField(char cur, int count, TemporalField field) {
FIELD_MAP.put('L', ChronoField.MONTH_OF_YEAR); // SDF, LDML (stand-alone)
FIELD_MAP.put('D', ChronoField.DAY_OF_YEAR); // SDF, LDML
FIELD_MAP.put('d', ChronoField.DAY_OF_MONTH); // SDF, LDML
FIELD_MAP.put('F', ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH); // SDF, LDML
FIELD_MAP.put('F', ChronoField.ALIGNED_WEEK_OF_MONTH); // SDF, LDML
FIELD_MAP.put('E', ChronoField.DAY_OF_WEEK); // SDF, LDML (different to both for 1/2 chars)
FIELD_MAP.put('c', ChronoField.DAY_OF_WEEK); // LDML (stand-alone)
FIELD_MAP.put('e', ChronoField.DAY_OF_WEEK); // LDML (needs localized week number)
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1051,7 +1051,7 @@ Object[][] dataValid() {
{"d", "Value(DayOfMonth)"},
{"dd", "Value(DayOfMonth,2)"},

{"F", "Value(AlignedDayOfWeekInMonth)"},
{"F", "Value(AlignedWeekOfMonth)"},

{"Q", "Value(QuarterOfYear)"},
{"QQ", "Value(QuarterOfYear,2)"},

1 comment on commit 733c790

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 733c790 Mar 4, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.