src/English/timex/Day.cpp
// Returns 1-7 representing Monday .. Sunday

Returns 1-7 representing Monday .. Sunday
Returns 1 - 7 representing Monday .. Sunday
int Day::dayOfWeek(int year, int month, int day) {
	if ((year < 0) || ((month < 0) || (month > 12)) || (day < 0) || (day > 31)) {
		return -1;
	}
	int a = (14 - month) / 12;
	year -= a;
	month += (12 * a) - 2;
	int answer = (day + year + (year / 4) - (year / 100) +
		(year / 400) + (31 * month / 12)) % 7; 
	return (answer ? answer : 7);  
}
int Day :: dayOfWeek ( int year , int month , int day ) { if ( ( year < 0 ) || ( ( month < 0 ) || ( month > 12 ) ) || ( day < 0 ) || ( day > 31 ) ) { return -1 ; } int a = ( 14 - month ) / 12 ; year -= a ; month += ( 12 * a ) - 2 ; int answer = ( day + year + ( year / 4 ) - ( year / 100 ) + ( year / 400 ) + ( 31 * month / 12 ) ) % 7 ; return ( answer ? answer : 7 ) ; }
Returns 1-7 representing Monday .. Sunday
Returns 1 - 7 representing Monday .. Sunday
// equals 0 - 6 representing Sunday ... Saturday
 // because we want Sunday to be 7, not 0
