char uCase(char c) { if ((c>='a') && (c<='z')) return (c-0x20); else return c; } byte calcDOW(byte d, byte m, int y) { int dow; byte mArr[12] = {6,2,2,5,0,3,5,1,4,6,2,4}; dow = (y % 100); dow = dow*1.25; dow += d; dow += mArr[m-1]; if (((y % 4)==0) && (m<3)) dow -= 1; while (dow>7) dow -= 7; return dow; }