HelenOS sources

day_of_week       354 uspace/lib/c/generic/time.c 	tm->tm_wday = day_of_week(year, mon, day + 1);
day_of_week       396 uspace/lib/c/generic/time.c 	int start_wday = day_of_week(year, 0, 1);
day_of_week       438 uspace/lib/c/generic/time.c 	int first_day = (7 - day_of_week(tm->tm_year, 0, 1)) % 7;
day_of_week       486 uspace/lib/c/generic/time.c 	int first_day = (1 - day_of_week(tm->tm_year, 0, 1)) % 7;
HelenOS homepage, sources at GitHub