tracker issue : CF-4126506

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

[ANeff] ER for: week(dateTime, "iso") and year(dateTime, "iso") to return integers

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

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

Created: 03/09/2016

Components: Language

Versions: 2016

Failure Type: Unspecified

Found In Build/Fixed In Build: Beta1_v12 /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Win All

Vote Count: 0

Currently, week(dateTime, "iso") returns a string like 2016-W2. That is the ISO string, however CF could take it a step further. B/c what developers will *actually* want is an integer week and an integer year.

Suggestion:

<cfscript>
  dateTime = createDate(2016,1,3);
  writeOutput(week(dateTime, "iso") & ' | ' & year(dateTime, "iso"));
</cfscript>

Expected result:
53 | 2015

Currently, year(dateTime, "iso") throws exception: "The function takes 1 parameter." It should return the ISO 8601 year integer. Then, week(dateTime, "iso") can return the ISO 8601 week integer.

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

Watson Bug ID:	4126506

External Customer Info:
External Company:  
External Customer Name: Aaron Neff
External Customer Email: adobelabs@itisdesign.com
External Test Config:

Attachments:

Comments:

Adding BUG AUDIT TRAIL ********action: updated fieldName: Reason newValue: NotABug oldValue: NotABug oprid: inoel recordName: RQ_DEFECT timpestamp: 2015-12-14 14:21:34.0 action: updated fieldName: Status newValue: Withdrawn oldValue: ToTest oprid: inoel recordName: RQ_DEFECT timpestamp: 2015-12-14 14:21:34.0 action: updated fieldName: State newValue: Closed oldValue: Open oprid: inoel recordName: RQ_DEFECT timpestamp: 2015-12-14 14:21:34.0 action: updated fieldName: Owner newValue: Blank oldValue: inoel oprid: inoel recordName: RQ_DEFECT timpestamp: 2015-12-14 14:21:34.0 action: updated fieldName: Closed By newValue: inoel oldValue: Blank oprid: inoel recordName: RQ_DEFECT timpestamp: 2015-12-14 14:21:34.0 action: updated fieldName: Date Closed newValue: 2015-12-14 06:21:34.0 oldValue: Blank oprid: inoel recordName: RQ_DEFECT timpestamp: 2015-12-14 14:21:34.0 action: updated fieldName: Owner newValue: inoel oldValue: awdhesh oprid: awdhesh recordName: RQ_DEFECT timpestamp: 2015-12-14 06:22:50.0 action: updated fieldName: Status newValue: ToTest oldValue: ToFix oprid: awdhesh recordName: RQ_DEFECT timpestamp: 2015-12-14 06:22:50.0 action: updated fieldName: Reason newValue: NotABug oldValue: Blank oprid: awdhesh recordName: RQ_DEFECT timpestamp: 2015-12-14 06:22:50.0 action: updated fieldName: Reason newValue: Blank oldValue: Investigate oprid: inoel recordName: RQ_DEFECT timpestamp: 2015-12-14 05:00:27.0 action: updated fieldName: Fix By Product Milestone newValue: Gold Master oldValue: Blank oprid: inoel recordName: RQ_DEFECT timpestamp: 2015-12-14 03:26:51.0 action: updated fieldName: Owner newValue: awdhesh oldValue: inoel oprid: inoel recordName: RQ_DEFECT timpestamp: 2015-12-14 03:26:51.0 action: updated fieldName: Status newValue: ToFix oldValue: Unverified oprid: inoel recordName: RQ_DEFECT timpestamp: 2015-12-14 03:26:51.0 action: updated fieldName: Reason newValue: Investigate oldValue: Blank oprid: inoel recordName: RQ_DEFECT timpestamp: 2015-12-14 03:26:51.0 action: updated fieldName: Fix By Milestone newValue: Gold Master oldValue: Blank oprid: inoel recordName: RQ_DEFECT timpestamp: 2015-12-14 03:26:51.0
Comment by CFwatson U.
3932 | March 09, 2016 02:22:12 AM GMT
Added By: PreRelease User User Name:Aaron Neff Note Added: The reason ISO week format is 2016-W2 is b/c the week-of-year and year may differ from calendar week-of-year and year. week(dateTime, "iso") only returns 50% of the info (b/c it only returns the ISO week-of-year but not the ISO year). Suggestion: weekYear(dateTime, "iso") or remove "iso" parameter from week(). Code relying on week-of-year would also need the year. Date Added :2016-01-09 01:00:25.0 Added By:awdhesh Note Added: We will not be changing year functionality by adding ISO mask. Even excel returns the week as 53 for boundry condition but year is always 2016 for above case. Just like year, same holds true for month as well. Date Added :2015-12-14 06:22:50.0 Added By: PreRelease User User Name:Aaron Neff Note Added: BTW, credit for week(dateTime, "iso") returning integer goes to Adam. Date Added :2015-12-11 09:20:14.0 Added By: PreRelease User User Name:Aaron Neff Note Added: The forum thread discussing this ticket is: http://prerelease.adobe.com/r/?b2dbf427f9344befb4e1b63cDVAAE-32398379 Please follow-up in that thread, not here in this ticket. Date Added :2015-12-11 09:19:06.0 Added By: PreRelease User User Name:Aaron Neff Note Added: Entered Feature. Date Added :2015-12-11 09:10:47.0
Comment by CFwatson U.
3933 | March 09, 2016 02:22:13 AM GMT
Added By:inoel Note Added: Return format of week(date, "iso") has been changed to integer as part of the fix for bug# CF-4097175. We will not be adding "iso" mask to year, since this may result in date changes. Date Added :2015-12-14 14:21:34.0 Added By:inoel Note Added: The first part of the bug, Ensuring week(dateTime, "iso") returns an integer has been fixed as part of bug# CF-4097175. As for the second part of the bug, we need to add a new parameter "iso" for the "year" method. Consider the below code snippet: dateTime = createDate(2016,1,3); writeOutput(year(dateTime, "iso")); year(dateTime,"iso") must return 2015 (four digit year), though the specified year is 2016, since 2016-1-3 belongs to the 53rd week of 2015. ISO 8601 for Years: https://en.wikipedia.org/wiki/ISO_8601#Years Date Added :2015-12-14 03:26:51.0
Comment by CFwatson U.
27580 | March 09, 2016 02:22:15 AM GMT