Solution:Formula for calculating day of any date 0 = sunday, 1 = monday ….
6 = saturday A = century code (4,2,0,6 for remainder 1,2,3,0) dividing first two digits of the year by 4, B = last two digits of year, C = number of leap years fallen in that century before that date, D = month code (respective code of the months are 0,3,3,6,1,4,6,2,5,0,3,5) E = date, Day = remainder of (A + B + C + D + E) when divided by 7. For 26 January 1989
A = 0, B = 89, C = 22, D = 0, E = 26
A + B + C + D + E = 137,137 divided by 7 gives remainder as 4, 4 means Thursday.