Calculating the day of the week is not very simple, because of the irregularities in the Gregorian system