Foswiki on GitHub is open for business! Next release meeting: Monday October 13, 1300Z

Item11506: Value of GMTIME{"$week"} is not ISO8601 conform

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Engine    
According to ISO8601, week numbers come always in two digits.

So, currently we are in week 06.

Therefore, Foswiki returning simply 6 has to be a bug.

   * %GMTIME{"$week"}%

Result:
  • 44 (computed)
  • 6 (Foswiki 1.1.4 on 06 Feb 2012)

Expected:
  • 06 (on 06 Feb 2012, the day this bug is recorded)

-- AndreLichtsteiner - 06 Feb 2012

The docs claiming that $week is ISO8601 week is incorrect. There is also a stalled proposal to add $we as the 2-digit week. See InGMTIMESupportTwoDigitWeek - Due to the types of uses of the current $week, adding another format type is probably the better solution, in order to not break applications dependent upon the current format. It needs a developer to pick up the proposal and add the format.

-- GeorgeClark - 08 Feb 2012

Ok, committed tests and code to add $we support, which is kind of ISO8601. At least it's 0-padded. Merging into Release and closing.

-- OlivierRaginel - 24 Feb 2012

Olivier, does this need to be merged into 1.2 / trunk as well? Also changing the Released-in release to 1.1.5 so the release notes pick up this. I think it's also an enhancement.

-- GeorgeClark - 18 Mar 2012

No need to merge into 1.2 / trunk, as I developed it there. It seems the script didn't update the checking boxes accordingly, fixing manually, and setting to "Waiting for release".

-- OlivierRaginel - 30 Mar 2012
 
Topic revision: r11 - 11 Apr 2012, GeorgeClark
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License