I discovered that QV12 appears to support general week numbering natively but it doesn't work as I expect, can anyone help me understand how to use this feature? Details follow..... (I'm using version 12.0.201 SR2)
QV 12 now generates the following new number interpretation variables in all new docs (default values shown)
I thought, great, I can change these and have functions like Week() and WeekDay() etc respond appropriately but I didn't get the results that I expected.
Here's my example:
SET FirstWeekDay=5; (weeks start on Saturday)
SET BrokenWeeks=0; (unbroken weeks)
SET ReferenceDay=0; (not applicable to unbroken weeks)
SET FirstMonthOfYear=1; (default)
With these settings I get:
vDate = 03-Jan-2016 (my test date, this is a Sun)
Week(vDate) = 1 (we agree)
WeekYear(vDate) = 2015 (I expected 2016 because this is week 1 of 2016?)
WeekDay(vDate) = Sun (we agree)
Num(WeekDay(vDate)) = 1 (we agree)
A key characteristic is that WeekYear always seems to change between Sun & Mon (default behaviour) independent of FirstWeekDay!
It gets worse if I change FirstMonthOfYear=2 (Feb), eg:
YearStart(vDate) = 01-Jan-2016 (I expected 01-Feb-2015)
QuarterName(vDate) = Jan-Mar 2016 (I expected Nov-Jan ?)
Clearly I have misunderstood something, can anyone help?
Sorry, No Luiz but good to have you confirm it's not just me! I ended sticking with my QV11 Calendar script, it's based on HIC's post Redefining the Week Numbers I think I found a bug in his script for broken weeks but I have never followed it up with him and it may just be my interpretation of the definitions.