From BBC History ‘The Battle of the Boyne’
The Battle of the Boyne was fought on 1 July 1690, according to the old Julian calendar. This was reformed and replaced with the Gregorian calendar across the British Empire in 1752, repositioning the 'date' of the Battle of the Boyne to 11 July. The method of altering historical dates was somewhat complicated, with eleven days being added to 'old style' dates occurring after 1700, but only ten days to those taking place before that.
There is some dispute over whether celebrating on 12 July is simply the result of a slight historical miscalculation, or a case of the Battle of the Boyne replacing the Battle of Aughrim (another important battle in the Williamite War which took place on 12 July in the Julian calendar) as the focus of commemoration. Either way, William's victory at the Battle of the Boyne has been celebrated on 12 July for over 200 years.Eviatar Zerubavel’s 2003 Time Maps: Collective Memory and the Social Shape of the Past is excellent on our obsession with anniversaries.