checkdayofweek
if (checkdayofweek(date, &len, &offset, &dow) != 0) {
if (checkdayofweek(p2, &len, &offset, &dow) != 0) {
&& checkdayofweek(p2, &len, &offset, &dow) != 0) {
static int checkdayofweek(char *s, size_t *len, size_t *offset, const char **dow);