[Solved] Calculating the day of the week using Gauss Algorithm


Gauss’

R(1 + 5R(A – 1, 4) + 4R(A – 1, 100) + 6R(A – 1, 400), 7)

should be equivalent to

int week_day = (1 + 5 * (year - 1) % 4) + 4 * ((year - 1) % 100) + 6 * ((year - 1) % 400) % 7;

1

solved Calculating the day of the week using Gauss Algorithm