Returns a number that indicates where the week falls numerically within a year. We assume that the week containing January 1st is the first week of the year.
See this note.
int WeekNum(double d, int n)
d
n
1 (default) | Week starts on Sunday |
---|---|
2 | Week starts on Monday |
If it is a Julian days date, return the calendar week number of the year, 1 to 53.
If it is not a Julian days date, return -1.
int rr=weeknum(date(1/11/2009)); rr= ; // Should return where the week falls numerically within a year, 3.
int rr=weeknum(2454842,2); rr=; // Should return where the week falls numerically within a year, 2.