The described function (WEEKNUM) does not support weeks starting with Saturday, common in various Muslim countries including Iran.
Extend the function so that it includes a value for "weekday-start-flag" that counts weeks that start with Saturday.
Part 4, 3.17.7.342
te
Proposed Disposition of DIS 29500 Comment IR-0004 (Modified: 2008-01-11) We agree that the issue raised is valid , . We also intend extending the specification to allow for the week numbering system detailed in ISO 8601, in addition to the existing system. We and propose the following changes be made: Part 4, §3.17.7.342, page 2,820, line 1 Description: Computes the week number of the date corresponding to serial-value. The function allows two number systems: System 1: The week containing January 1 is the first week of the year, and is numbered week 1. System 2: The week containing the first Thursday of the year is the first week of the year, and is numbered as week 1 (as specified in ISO 8601). Arguments: Name Type Description weekday-start-flag number When truncated to integer, indicates the weekday on which the week begins, as follows: weekday-start-flag Meaning Number System 1 or omitted Week begins on Sunday. System 1 2 Week begins on Monday. System 1 11 Week begins on Monday. System 1 12 Week begins on Tuesday. System 1 13 Week begins on Wednesday. System 1 14 Week begins on Thursday. System 1 15 Week begins on System 1 Name Type Description Friday. 16 Week begins on Saturday. System 1 17 Week begins on Sunday. System 1 21 Week begins on Monday. System 2 Part 4, §3.17.7.342, page 2,820, lines 912 [Example: WEEKNUM(DATE(2006,1,1) results in 1 WEEKNUM(DATE(2006,1,1),1) results in 1 WEEKNUM(DATE(2006,1,1),17) results in 1 WEEKNUM(DATE(2006,1,1),21) results in 1 WEEKNUM(DATE(2006,2,1),1) results in 5 WEEKNUM(DATE(2006,2,1),2) results in 6 WEEKNUM(DATE(2006,2,1),11) results in 6 end example]
