Re:ISO-8601, YYYY, yyyy, and why your year may be wrong
by bassman9000 on Wednesday December 26, 2018 @04:53PM
(#18765254)
Javadoc uses yyyy for year since at least 1.5
https://docs.oracle.com/javase/1.5.0/docs/api/java/text/Simp...
I've never seen YYYY used in Java.
Re:ISO-8601, YYYY, yyyy, and why your year may be wrong
by adamvoncorswant on Wednesday December 26, 2018 @03:27PM
(#18764592)
Isn't it fun that while we're all discussing 'yyyy' vs 'YYYY', it sees like we're missing out that what everyone actually should use most of the time is rather 'uuuu'?
Re:ISO-8601, YYYY, yyyy, and why your year may be wrong
by lstamour on Wednesday December 26, 2018 @04:03PM
(#18764860)
uuuu appears to be Java-specific: https://stackoverflow.com/questions/41177442/uuuu-versus-yyy...
Re:ISO-8601, YYYY, yyyy, and why your year may be wrong
by adamvoncorswant on Thursday December 27, 2018 @03:29PM
(#18772366)
Yes, indeed so. That's why I answered in the java thread. Sorry for not making that clear.
new java.text.SimpleDateFormat("YYYY-MM-dd").parse("2018-12-30") returns Sun Dec 31 2017
new java.text.SimpleDateFormat("YYYY-MM-dd").format(new java.util.Date("12/30/2018")) returns 2019-12-30
java.time from Java8 also affected.
java.time.format.DateTimeFormatter.ofPattern("YYYY-MM-dd").format(java.time.LocalDate.parse("2018-12-30")) returns 2019-12-30