You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Ezer Karavani (Jira)" <ji...@apache.org> on 2019/12/29 11:12:00 UTC

[jira] [Closed] (GROOVY-9355) Date.format provides wrong week number value (end of year bug)

     [ https://issues.apache.org/jira/browse/GROOVY-9355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ezer Karavani closed GROOVY-9355.
---------------------------------
    Resolution: Won't Fix

seems that this confusing behavior is by design..
[https://en.wikipedia.org/wiki/ISO_week_date]

> Date.format provides wrong week number value (end of year bug)
> --------------------------------------------------------------
>
>                 Key: GROOVY-9355
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9355
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>    Affects Versions: 2.5.8
>            Reporter: Ezer Karavani
>            Priority: Minor
>
> executing the following code (on December 29, 2019) 
> {code:java}
> print new Date().format('yyyy.ww') {code}
> will output:
> {code:java}
> 2019.01 {code}
> where the expected value would be {{2019.52}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)