Skip to content

Commit

Permalink
8310182: DateTimeFormatter date formats (ISO_LOCAL_DATE) separated wi…
Browse files Browse the repository at this point in the history
…th hyphen, not dash

Reviewed-by: rriggs, darcy, iris, lancea
  • Loading branch information
naotoj committed Jun 27, 2023
1 parent 2bd4136 commit ec45bd6
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, 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
Expand Down Expand Up @@ -782,10 +782,10 @@ public static DateTimeFormatter ofLocalizedPattern(String requestedTemplate) {
* <li>Four digits or more for the {@link ChronoField#YEAR year}.
* Years in the range 0000 to 9999 will be pre-padded by zero to ensure four digits.
* Years outside that range will have a prefixed positive or negative symbol.
* <li>A dash
* <li>A hyphen ('HYPHEN-MINUS', U+002D)
* <li>Two digits for the {@link ChronoField#MONTH_OF_YEAR month-of-year}.
* This is pre-padded by zero to ensure two digits.
* <li>A dash
* <li>A hyphen ('HYPHEN-MINUS', U+002D)
* <li>Two digits for the {@link ChronoField#DAY_OF_MONTH day-of-month}.
* This is pre-padded by zero to ensure two digits.
* </ul>
Expand Down Expand Up @@ -1115,7 +1115,7 @@ public static DateTimeFormatter ofLocalizedPattern(String requestedTemplate) {
* <li>Four digits or more for the {@link ChronoField#YEAR year}.
* Years in the range 0000 to 9999 will be pre-padded by zero to ensure four digits.
* Years outside that range will have a prefixed positive or negative symbol.
* <li>A dash
* <li>A hyphen ('HYPHEN-MINUS', U+002D)
* <li>Three digits for the {@link ChronoField#DAY_OF_YEAR day-of-year}.
* This is pre-padded by zero to ensure three digits.
* <li>If the offset is not available to format or parse then the format is complete.
Expand Down Expand Up @@ -1155,11 +1155,11 @@ public static DateTimeFormatter ofLocalizedPattern(String requestedTemplate) {
* <li>Four digits or more for the {@link IsoFields#WEEK_BASED_YEAR week-based-year}.
* Years in the range 0000 to 9999 will be pre-padded by zero to ensure four digits.
* Years outside that range will have a prefixed positive or negative symbol.
* <li>A dash
* <li>A hyphen ('HYPHEN-MINUS', U+002D)
* <li>The letter 'W'. Parsing is case insensitive.
* <li>Two digits for the {@link IsoFields#WEEK_OF_WEEK_BASED_YEAR week-of-week-based-year}.
* This is pre-padded by zero to ensure three digits.
* <li>A dash
* <li>A hyphen ('HYPHEN-MINUS', U+002D)
* <li>One digit for the {@link ChronoField#DAY_OF_WEEK day-of-week}.
* The value run from Monday (1) to Sunday (7).
* <li>If the offset is not available to format or parse then the format is complete.
Expand Down

3 comments on commit ec45bd6

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@naotoj
Copy link
Member Author

@naotoj naotoj commented on ec45bd6 Jun 27, 2023

Choose a reason for hiding this comment

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

/backport jdk21

@openjdk
Copy link

@openjdk openjdk bot commented on ec45bd6 Jun 27, 2023

Choose a reason for hiding this comment

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

@naotoj the backport was successfully created on the branch naotoj-backport-ec45bd64 in my personal fork of openjdk/jdk21. To create a pull request with this backport targeting openjdk/jdk21:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit ec45bd64 from the openjdk/jdk repository.

The commit being backported was authored by Naoto Sato on 27 Jun 2023 and was reviewed by Roger Riggs, Joe Darcy, Iris Clark and Lance Andersen.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21:

$ git fetch https://github.com/openjdk-bots/jdk21.git naotoj-backport-ec45bd64:naotoj-backport-ec45bd64
$ git checkout naotoj-backport-ec45bd64
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21.git naotoj-backport-ec45bd64

Please sign in to comment.