This function is used to return the day of the week given a Julian Date. By default, day values are from 0 (Sunday) to 6 (Saturday).
See this note.
int WeekDay(double d[, int n])
d
n
0 (default) | Returns 0 (Sunday) through 6 (Saturday) [Same as Origin DayOfWeek] |
---|---|
1 | Returns 1 (Sunday) through 7 (Saturday) |
2 | Returns 0 (Monday) through 6 (Sunday) |
3 | Returns 1 (Monday) through 7 (Sunday) |
If it is a Julian days date, return the the day of the week, 0 to 6 or 1 to 7 according your setting of n.
If it is not a Julian days date, return -1.
int rr=weekday(2454825); rr= ; // Should return the day of the week, 4.
int rr=weekday(2454825, 1); rr= ; // Should return the day of the week, 5.