Skip to content

Commit ec45bd6

Browse files
committedJun 27, 2023
8310182: DateTimeFormatter date formats (ISO_LOCAL_DATE) separated with hyphen, not dash
Reviewed-by: rriggs, darcy, iris, lancea
1 parent 2bd4136 commit ec45bd6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎src/java.base/share/classes/java/time/format/DateTimeFormatter.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -782,10 +782,10 @@ public static DateTimeFormatter ofLocalizedPattern(String requestedTemplate) {
782782
* <li>Four digits or more for the {@link ChronoField#YEAR year}.
783783
* Years in the range 0000 to 9999 will be pre-padded by zero to ensure four digits.
784784
* Years outside that range will have a prefixed positive or negative symbol.
785-
* <li>A dash
785+
* <li>A hyphen ('HYPHEN-MINUS', U+002D)
786786
* <li>Two digits for the {@link ChronoField#MONTH_OF_YEAR month-of-year}.
787787
* This is pre-padded by zero to ensure two digits.
788-
* <li>A dash
788+
* <li>A hyphen ('HYPHEN-MINUS', U+002D)
789789
* <li>Two digits for the {@link ChronoField#DAY_OF_MONTH day-of-month}.
790790
* This is pre-padded by zero to ensure two digits.
791791
* </ul>
@@ -1115,7 +1115,7 @@ public static DateTimeFormatter ofLocalizedPattern(String requestedTemplate) {
11151115
* <li>Four digits or more for the {@link ChronoField#YEAR year}.
11161116
* Years in the range 0000 to 9999 will be pre-padded by zero to ensure four digits.
11171117
* Years outside that range will have a prefixed positive or negative symbol.
1118-
* <li>A dash
1118+
* <li>A hyphen ('HYPHEN-MINUS', U+002D)
11191119
* <li>Three digits for the {@link ChronoField#DAY_OF_YEAR day-of-year}.
11201120
* This is pre-padded by zero to ensure three digits.
11211121
* <li>If the offset is not available to format or parse then the format is complete.
@@ -1155,11 +1155,11 @@ public static DateTimeFormatter ofLocalizedPattern(String requestedTemplate) {
11551155
* <li>Four digits or more for the {@link IsoFields#WEEK_BASED_YEAR week-based-year}.
11561156
* Years in the range 0000 to 9999 will be pre-padded by zero to ensure four digits.
11571157
* Years outside that range will have a prefixed positive or negative symbol.
1158-
* <li>A dash
1158+
* <li>A hyphen ('HYPHEN-MINUS', U+002D)
11591159
* <li>The letter 'W'. Parsing is case insensitive.
11601160
* <li>Two digits for the {@link IsoFields#WEEK_OF_WEEK_BASED_YEAR week-of-week-based-year}.
11611161
* This is pre-padded by zero to ensure three digits.
1162-
* <li>A dash
1162+
* <li>A hyphen ('HYPHEN-MINUS', U+002D)
11631163
* <li>One digit for the {@link ChronoField#DAY_OF_WEEK day-of-week}.
11641164
* The value run from Monday (1) to Sunday (7).
11651165
* <li>If the offset is not available to format or parse then the format is complete.

0 commit comments

Comments
 (0)
Please sign in to comment.