You are here: Foswiki>Tasks Web>Item11506 (11 Apr 2012, GeorgeClark)Edit Attach

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

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.5
Target Release: patch
Applies To: Engine
Component:
Branches: Release01x01
Reported By: AndreLichtsteiner
Waiting For:
Last Change By: GeorgeClark
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:
  • 48 (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 Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy