RFR:JDK-8155823: Add date-time patterns 'v' and 'vvvv'
Roger Riggs
Roger.Riggs at Oracle.com
Mon May 9 19:24:15 UTC 2016
Hi Nadeesh,
java/time/format/DateTimeFormatter.java: line 312
- Move 'v' up 1 line so it is after 'V' and before 'z'.
Also in DateTimeFormatterBuilder.java: line 1415+
- the description of the number of letters does not need to be repeated;
put one copy before the specifics of 'z' and 'v'.
"If the count of letters is one, then the short name is output.
+ * If the count of letters is four, then the full name is output.
+ * Two, three and five or more letters throw {@code
IllegalArgumentException}."
DateTimeFormatterBuilder.java
- line 1625/1626: should include what happens with vv and vvv to be
consistent with DateTimeFormatter doc for ZoneId names.
- line 1647: The description in DateTimeFormatter says that count = 2
and 3 should also produce the short value
but the code will throw IAE.
-line 1988: "almost" --- can this be more specific about what
matches or does not match
In the test it is a bit bothersome that the tests have to rely on
timezone specific data.
Thanks, Roger
On 5/9/2016 12:35 PM, nadeesh tv wrote:
>
> Hi all,
>
> Reposting because subject line did not follow the format.
>
> Bug Id : https://bugs.openjdk.java.net/browse/JDK-8155823
> Issue: Add date-time patterns 'v' and 'vvvv'
> webrev: http://cr.openjdk.java.net/~ntv/8155823/webrev.03/
>
> This webrev also contain the fix of related bug
> https://bugs.openjdk.java.net/browse/JDK-8154567 as part of this.
>
> Special thanks for Stephen for his help in writing the spec.
>
More information about the core-libs-dev
mailing list