I've just worked out that whoever coded the calendar I've been using (for my secondary world) got their maths wrong. They start the calendar from year 0, but take start day from year 1. It means that everything is out by a day (possibly more once leap years are calculated).