If 0 =Sunday,1 =Monday,2 =Tuesday, … , 6 = Saturday, then January 1 of year n occurs on the day of the week given by the following formula: Use the formula to January 1 of (i) 2020, (ii) 2000, (iii) year of your birth code example
Example: get day from date algo
dow(m,d,y){y-=m<3;return(y+y/4-y/100+y/400+"-bed=pen+mad."[m]+d)%7;}