Week Number problem
Posted on 2010-08-18
I have the following function to produce the week number from a given date:
<CFFUNCTION NAME="GetWeekNo" RETURNTYPE="String">
<CFARGUMENT NAME="MDate" DATATYPE="Date" REQUIRED="True">
<CFIF Year(MDate) EQ 2012 OR Year(MDate) EQ 2017 OR Year(MDate) EQ 2023 OR
Year(MDate) EQ 2034 OR Year(MDate) EQ 2040 OR Year(MDate) EQ 2045 OR
Year(MDate) EQ 2051 OR Year(MDate) EQ 2062>
The function works properly (the years mentioned in the function are to re-align the weeks because 01/01/year in those years produces week 00)
My boss now wants the week numbers to correspond with those in MSOutlook, with the first week of the year being the first full week.
I have tried manipulating the code in the function but I am getting in a mess! Can someone please help me work it out?