• That's the same algorithm I posted further up the thread, although rather better explained.

    The only assumption that is made is that you know a Monday, which in your case is day 0.

    I rather unnecessarily tied myself in knots trying to make that assumption explicit and avoid dates before February 1900, to avoid leap year confusions.