tracker issue : CF-3917706

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] ER for: ISO 8601 support in week()

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 01/08/2015

Components: Language

Versions: 11.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Platforms All

Vote Count: 3

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on August 24, 2019 using build 2016.0.01.298513
week() doesn't use the ISO 8601 standard. #3765535 is updating the date/time format functions to support ISO 8601. This ER is to do the same for week().

Example: week(now(), "iso")

Related tickets: #3915699 and #3765535

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3917706

External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:

Attachments:

Comments:

YES PLEASE!..............................
Vote by External U.
9055 | January 08, 2015 07:04:00 AM GMT
I'd like to see this as well. In the meantime, if anyone want's a CFC I use to get the ISO week for a given date, shoot me a message and I'll be happy to share.
Comment by External U.
9038 | January 09, 2015 11:56:21 AM GMT
I'd like to see this added as well.
Vote by External U.
9056 | January 09, 2015 11:56:35 AM GMT
+1...............................
Vote by External U.
9057 | January 10, 2015 07:51:41 PM GMT
Hi Adobe, I see this ticket is now Closed/Fixed. Was a second parameter introduced which optionally accepts the string "iso"? Thanks!, -Aaron
Comment by External U.
9039 | November 13, 2015 01:29:04 AM GMT
[subscribe]
Comment by External U.
9040 | November 25, 2015 05:48:40 AM GMT
And fixed in *what version*?
Comment by External U.
9041 | November 25, 2015 05:49:24 AM GMT
+1 to Adam's question and for getting an answer to my question below: Was a second parameter introduced which optionally accepts the string "iso"? Thanks!, -Aaron
Comment by External U.
9042 | November 25, 2015 07:10:30 AM GMT
Copying previous internal note to external for clarification: added the mask "iso" in week(), which will return in ISO 8601 format Also, this is marked as fixed in Raijin
Comment by Elishia D.
9043 | November 25, 2015 01:05:55 PM GMT
Hi Elishia, Thanks very much! -Aaron
Comment by External U.
9044 | November 25, 2015 02:56:18 PM GMT
Was this updated in Coldfusion10? week(now(), "iso") Returns the standard error on fully patched development server.
Comment by External U.
9045 | December 02, 2015 01:14:56 PM GMT
Charles: as per Elishia's comment, it's dealt with in CF12.
Comment by External U.
9046 | December 02, 2015 01:47:18 PM GMT
Thanks Adam; I am now going though code adding the isoweek from cflib. One day they might actually patch issues in active products like CF11/10 but not this day it seems.
Comment by External U.
9047 | December 02, 2015 02:02:20 PM GMT
-> Week(date,"iso") adheres to ISO 8601 spec. -> Returns an integer.
Comment by Immanuel N.
9048 | December 14, 2015 06:53:44 AM GMT
Hi Immanuel, That's not what the ISO spec says. ISO spec says, for example, the ISO 8601 week for January 3, 2016 is string "2015-W53". If week(date, "iso") will not adhere to the spec and only returns integer (53 in this case), then there needs to be another way to get the year portion (2015 in this case) w/o any additional calculations. Suggestion: year(date, "isoweek"). This ticket can't be closed if week(date, "iso") is only returning 50% (week but not year) of what the spec says. Thanks!, -Aaron
Comment by External U.
9049 | December 14, 2015 09:29:48 AM GMT
> "That's not what the ISO spec says. ISO spec says, for example, the ISO 8601 week for January 3, 2016 is string "2015-W53"." Can you provide a ref for that, Aaron? All the stuff I saw about week numbers they just mention a two-digit week. It was only when they started talking about it as part of an ISO *date* they started mentioning years (natch), and adding Ws and stuff. Not doubting you, just couldnae find it.
Comment by External U.
9050 | December 14, 2015 01:45:02 PM GMT
Hi Adam, 'the ISO 8601 week for January 3, 2016 is string "2015-W53"' should've been: 'the ISO 8601 week date for January 3, 2016 is string "2015-W537"' (7 indicating Sunday, ISO's 7th day of the week) I should've said "week date" instead of "week". And I should've said "2015-W537" instead of "2015-W53". You're right, I was talking about the 'week date', not just the week portion. I wish I could re-title this ticket as "[ANeff] ER for: ISO 8601 week date support" b/c week date affects 1) week in year number, 2) week's year number and 3) day in week number. Example: The week date for January 3, 2016 is essentially Sunday, the 7th day of the week, in the 53rd week of 2015. I was focused on #1 and #2 and missed #3. I really wish I could re-title this ticket. Thanks!, -Aaron
Comment by External U.
9051 | December 15, 2015 03:44:12 AM GMT
Well it's two different things. "week" and "week date". One is analogous to the current week() function, and one is analogous to a variation of dateTimeFormat()
Comment by External U.
9052 | December 15, 2015 03:51:42 AM GMT
Hi Adam, I agree. I've filed CF-4100122 for dayOfWeek(dateTime, "iso") and CF-4100144 for weekYear(dateTime[, "iso"]). If you file a dateTimeFormat() ticket I'll vote it up. Just throwing out some syntax thoughts.. dateTimeFormat(dateTime, "w|ww", "", "iso")//gets ISO8601 week in year dateTimeFormat(dateTime, "u", "", "iso")//gets ISO8601 day of week (note: currently "u" isn't supported and 1=Monday; and there's no non-ISO8601 1=Sunday mask) dateTimeFormat(dateTime, "yy|yyyy", "", "iso")//gets ISO8601 week date's year dateTimeFormat(dateTime, "Y", "", "iso")//gets ISO8601 week date's year And 3rd parameter would need to accept an empty string so "iso" can be specified w/o specifying time zone? Thanks!, -Aaron
Comment by External U.
9053 | December 15, 2015 05:44:20 AM GMT
So what's the fix for servers running CF11? CF9 Showing #week(now())# = 15 CF11 Showing #week(now())# = 16 http://www.epochconverter.com/weeknumbers = 15 (Today's date: 13 Apr 2016) Ryan
Comment by External U.
9054 | April 13, 2016 06:15:44 AM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Well.. for the ISO _week_ number, but not the ISO _week-numbering year_ number. Per https://en.wikipedia.org/wiki/ISO_8601: "[....]ISO week-numbering year which is slightly different from the traditional Gregorian calendar year[....]" This ticket's fix is a half-way-there, as it provides half the solution. Thanks!, -Aaron
Comment by Aaron N.
31189 | August 24, 2019 11:03:08 AM GMT