From ec45bd64d504d579aef54c924fb8ca75a944036f Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Tue, 27 Jun 2023 16:13:20 +0000 Subject: [PATCH] 8310182: DateTimeFormatter date formats (ISO_LOCAL_DATE) separated with hyphen, not dash Reviewed-by: rriggs, darcy, iris, lancea --- .../classes/java/time/format/DateTimeFormatter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java.base/share/classes/java/time/format/DateTimeFormatter.java b/src/java.base/share/classes/java/time/format/DateTimeFormatter.java index 3f681d4771f..3346de707ed 100644 --- a/src/java.base/share/classes/java/time/format/DateTimeFormatter.java +++ b/src/java.base/share/classes/java/time/format/DateTimeFormatter.java @@ -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 @@ -782,10 +782,10 @@ public final class DateTimeFormatter { *
  • 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. - *
  • A dash + *
  • A hyphen ('HYPHEN-MINUS', U+002D) *
  • Two digits for the {@link ChronoField#MONTH_OF_YEAR month-of-year}. * This is pre-padded by zero to ensure two digits. - *
  • A dash + *
  • A hyphen ('HYPHEN-MINUS', U+002D) *
  • Two digits for the {@link ChronoField#DAY_OF_MONTH day-of-month}. * This is pre-padded by zero to ensure two digits. * @@ -1115,7 +1115,7 @@ public final class DateTimeFormatter { *
  • 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. - *
  • A dash + *
  • A hyphen ('HYPHEN-MINUS', U+002D) *
  • Three digits for the {@link ChronoField#DAY_OF_YEAR day-of-year}. * This is pre-padded by zero to ensure three digits. *
  • If the offset is not available to format or parse then the format is complete. @@ -1155,11 +1155,11 @@ public final class DateTimeFormatter { *
  • 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. - *
  • A dash + *
  • A hyphen ('HYPHEN-MINUS', U+002D) *
  • The letter 'W'. Parsing is case insensitive. *
  • 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. - *
  • A dash + *
  • A hyphen ('HYPHEN-MINUS', U+002D) *
  • One digit for the {@link ChronoField#DAY_OF_WEEK day-of-week}. * The value run from Monday (1) to Sunday (7). *
  • If the offset is not available to format or parse then the format is complete.