Download raw body.
On 01-04-2026 21:41, Alvar Penning wrote: > Hi all, > > The following diff fixes the incorrect leap year detection within > newsyslog(8), I stumbled across while checking my other diff. > > Prior, a year was considered a leap year if > - it is divisible by 4, > - it is NOT divisible by 100 and > - it is divisible by 400. > > Unless I am really tired right now, this should be impossible. There > should be no number divisible by 400 but NOT divisible by 100. > Furthermore, enforcing that every leap year must be divisible by 400 > makes no real sense. > > A more straight forward implementation follows, handling both the > "divisible by 4 and not 100" and the "divisible by 4, 100 and 400" case. > > Best, > Alvar If your year is divisible by 400 it is a leap despite the fact that years divisible by 100 are not. It is to stop the seasons drifting. https://www.wolframalpha.com/input?i=leap+year hth Fred