Gets the day of the week for a datetime64[D] value */
| 25 | |
| 26 | /* Gets the day of the week for a datetime64[D] value */ |
| 27 | static int |
| 28 | get_day_of_week(npy_datetime date) |
| 29 | { |
| 30 | int day_of_week; |
| 31 | |
| 32 | /* Get the day of the week for 'date' (1970-01-05 is Monday) */ |
| 33 | day_of_week = (int)((date - 4) % 7); |
| 34 | if (day_of_week < 0) { |
| 35 | day_of_week += 7; |
| 36 | } |
| 37 | |
| 38 | return day_of_week; |
| 39 | } |
| 40 | |
| 41 | /* |
| 42 | * Returns 1 if the date is a holiday (contained in the sorted |
no outgoing calls
no test coverage detected