
Hello Time People! Apologies in advance, as I know this is a bit off-topic being not about time zones, but I know that many of you are invested in date and time programming, and I'd appreciate some peer discussion. I've been invested in the last many months on preventative measures against leap year bugs, both in my day job at Microsoft and in the public space. Some of my recent posts: https://stackoverflow.com/questions/57530882/what-are-some-examples-of-leap-... https://codeofmatt.com/on-the-life-cycle-of-a-leap-year-bug/ And from last leap year: https://codeofmatt.com/list-of-2016-leap-day-bugs/ https://azure.microsoft.com/en-us/blog/is-your-code-ready-for-the-leap-year/ Sometimes I feel like I'm overreacting, but then I remember the infamous 2012 Azure cloud leap day outage, and all the many other things across the industry that were impacted in 2016 (see my list above). My question for the community is this: Why are Y2K and Y2038 bugs such a hot topic when they are/were one-time events, but yet leap year bugs are rarely discussed even though they are recurring and can have critical impact? People seem to remember 20 years ago, but not 4 or 8 years back. Why? Are any of you working on leap year related issues? Have you checked your date math for leap year bugs? If not, why? Thanks, Matt

On Jan 22, 2020, at 1:32 PM, Matt Johnson-Pint <mj1856@hotmail.com> wrote:
Hello Time People! Apologies in advance, as I know this is a bit off-topic being not about time zones, but I know that many of you are invested in date and time programming, and I'd appreciate some peer discussion. ... My question for the community is this: Why are Y2K and Y2038 bugs such a hot topic when they are/were one-time events, but yet leap year bugs are rarely discussed even though they are recurring and can have critical impact? People seem to remember 20 years ago, but not 4 or 8 years back. Why?
Are any of you working on leap year related issues? Have you checked your date math for leap year bugs? If not, why?
My guess is that getting leap years right is a simple matter that any competent programmer will understand, while Y2K and Y2038 are not so obvious. As you said, these others are once in a lifetime issues. It's precisely that point that makes them less understood. Leap years have been encounteredin software for half a century or more; it is to be expected that people know how to get this right. It wouldn't surprise me to see software that falsely claims 2100 is a leap year, though. Fortunately we have a while to deal with those bugs. paul

On 2020-01-22 11:37, Paul.Koning@dell.com wrote:
On Jan 22, 2020, at 1:32 PM, Matt Johnson-Pint <mj1856@hotmail.com> wrote:
Hello Time People! Apologies in advance, as I know this is a bit off-topic being not about time zones, but I know that many of you are invested in date and time programming, and I'd appreciate some peer discussion. ... My question for the community is this: Why are Y2K and Y2038 bugs such a hot topic when they are/were one-time events, but yet leap year bugs are rarely discussed even though they are recurring and can have critical impact? People seem to remember 20 years ago, but not 4 or 8 years back. Why?
Are any of you working on leap year related issues? Have you checked your date math for leap year bugs? If not, why?
My guess is that getting leap years right is a simple matter that any competent programmer will understand, while Y2K and Y2038 are not so obvious.
As you said, these others are once in a lifetime issues. It's precisely that point that makes them less understood. Leap years have been encounteredin software for half a century or more; it is to be expected that people know how to get this right.
It wouldn't surprise me to see software that falsely claims 2100 is a leap year, though. Fortunately we have a while to deal with those bugs.
Everyone thinks they understand leap years (Feb 29 every multiple of 4 years, right?) so ignore it, including in their code. Oxford University had a copy with translation of Pope Gregory XIII's Inter gravissimas bull, dated AD MDLXXXI [ante diem] sexto Kalendas Martii (O.S.) 1582 February 24 (N.S.) in his 10th year as pope, with a clear statement of the rules, that I used to deal with confused senior IT staff and executives. A updated variation appears at http://www.bluewaterarts.com/calendar/NewInterGravissimas.htm [OT: Note the date issued on the Julian Calendar: as it was not an O.S. leap year this was not the leap day; the year changed on Lady Day March 25 (O.S.); still observed as HM gov fiscal and taxation year end April 5 (N.S.) as they were not giving up 11 days of taxes in 1751/2!] -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised.

Brian Inglis said:
[OT: Note the date issued on the Julian Calendar: as it was not an O.S. leap year this was not the leap day; the year changed on Lady Day March 25 (O.S.);
In England but not in Scotland, which had moved to the 1st January rule well before. It's my understanding that the insertion of 29th February was done on the basis of the Scottish system, not the English one, so there was a 29th February in 1743 and in 1747.
still observed as HM gov fiscal and taxation year end April 5 (N.S.) as they were not giving up 11 days of taxes in 1751/2!]
Just 1752; that was the first year that England changed rule. So 1751 was only 278 days long in England (and had no January or February at all); February 29th 1752 existed throughout the Union. -- Clive D.W. Feather | If you lie to the compiler, Email: clive@davros.org | it will get its revenge. Web: http://www.davros.org | - Henry Spencer Mobile: +44 7973 377646

On 2020-01-23 10:04, Clive D.W. Feather wrote:
Brian Inglis said:
[OT: Note the date issued on the Julian Calendar: as it was not an O.S. leap year this was not the leap day; the year changed on Lady Day March 25 (O.S.);
In England but not in Scotland, which had moved to the 1st January rule well before.
Probably for continental commercial reasons regardless of religious considerations, while keeping an eye on the crown to free up down south.
It's my understanding that the insertion of 29th February was done on the basis of the Scottish system, not the English one, so there was a 29th February in 1743 and in 1747.
Was there a different Julian/O.S. system in Scotland, and are there docs/refs?
still observed as HM gov fiscal and taxation year end April 5 (N.S.) as they were not giving up 11 days of taxes in 1751/2!]
Just 1752; that was the first year that England changed rule. So 1751 was only 278 days long in England (and had no January or February at all); February 29th 1752 existed throughout the Union.
You mean as January/February/March until 24th were still considered 1750 (O.S.)? Did the Empire change year numbering on January 1 from O.S. to N.S., prior to changing the calendar from Julian to Gregorian on September 14? -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised.

Brian Inglis said:
[OT: Note the date issued on the Julian Calendar: as it was not an O.S. leap year this was not the leap day; the year changed on Lady Day March 25 (O.S.); In England but not in Scotland, which had moved to the 1st January rule well before.
I meant well before 1752; I don't know when (or if they ever used the Lady Day convention).
Probably for continental commercial reasons regardless of religious considerations, while keeping an eye on the crown to free up down south.
Union of crowns was 1603; union of Parliaments was 1707.
It's my understanding that the insertion of 29th February was done on the basis of the Scottish system, not the English one, so there was a 29th February in 1743 and in 1747. Was there a different Julian/O.S. system in Scotland, and are there docs/refs?
I didn't make that clear, did I? My understanding (and, no, I don't have references) is that all of Europe had 29th February (whether the leap day is VI Kal.Mar. or 29th February is a notational matter and not relevant) in the same Februaries, so that the 29th February would be in 1743 and 1747 in England but in 1744 and 1748 in Scotland *but it's the same February*.
still observed as HM gov fiscal and taxation year end April 5 (N.S.) as they were not giving up 11 days of taxes in 1751/2!] Just 1752; that was the first year that England changed rule. So 1751 was only 278 days long in England (and had no January or February at all); February 29th 1752 existed throughout the Union.
You mean as January/February/March until 24th were still considered 1750 (O.S.)?
Yes.
Did the Empire change year numbering on January 1 from O.S. to N.S., prior to changing the calendar from Julian to Gregorian on September 14?
Yes: this was specified in the New Calendar Act. England Scotland ... ... 1747-12-31 1747-12-31 1747-01-01 1748-01-01 ... ... 1747-02-28 1748-02-28 1747-02-29 1748-02-29 1747-03-01 1748-03-01 ... ... 1747-03-24 1748-03-24 1748-03-25 1748-03-25 ... ... 1748-12-31 1748-12-31 1748-01-01 1749-01-01 ... ... 1748-02-28 1749-02-28 1748-03-01 1749-03-01 ... ... 1748-03-24 1749-03-24 1749-03-25 1749-03-25 ... ... 1749-12-31 1749-12-31 1749-01-01 1750-01-01 ... ... 1749-02-28 1750-02-28 1749-03-01 1750-03-01 ... ... 1749-03-24 1750-03-24 1750-03-25 1750-03-25 ... ... 1750-12-31 1750-12-31 1750-01-01 1751-01-01 ... ... 1750-02-28 1751-02-28 1750-03-01 1751-03-01 ... ... 1750-03-24 1751-03-24 1751-03-25 1751-03-25 ... ... 1751-12-31 1751-12-31 1752-01-01 1752-01-01 ... ... 1752-02-28 1752-02-28 1752-02-29 1752-02-29 1752-03-01 1752-03-01 ... ... 1752-03-24 1752-03-24 1752-03-25 1752-03-25 ... ... 1752-09-02 1752-09-02 1752-09-14 1752-09-14 ... ... 1752-12-31 1752-12-31 1753-01-01 1753-01-01 ... ... -- Clive D.W. Feather | If you lie to the compiler, Email: clive@davros.org | it will get its revenge. Web: http://www.davros.org | - Henry Spencer Mobile: +44 7973 377646

On 2020-01-23 15:23, Clive D.W. Feather wrote:
Brian Inglis said:
[OT: Note the date issued on the Julian Calendar: as it was not an O.S. leap year this was not the leap day; the year changed on Lady Day March 25 (O.S.); In England but not in Scotland, which had moved to the 1st January rule well before.
I meant well before 1752; I don't know when (or if they ever used the Lady Day convention).
Probably for continental commercial reasons regardless of religious considerations, while keeping an eye on the crown to free up down south.
Union of crowns was 1603; union of Parliaments was 1707.
Yes - we started using January 1 as the New Year in 1599/1600, instituted Hogmanay/Ne'erday as the winter festival in 1604, abolished Yule in 1640, resuming celebration in 1958; this and many other holy days and feast days were abandoned as superstitious observations by the Calvinist Presbyterians.
It's my understanding that the insertion of 29th February was done on the basis of the Scottish system, not the English one, so there was a 29th February in 1743 and in 1747. Was there a different Julian/O.S. system in Scotland, and are there docs/refs?
I didn't make that clear, did I?
My understanding (and, no, I don't have references) is that all of Europe had 29th February (whether the leap day is VI Kal.Mar. or 29th February is a notational matter and not relevant) in the same Februaries, so that the 29th February would be in 1743 and 1747 in England but in 1744 and 1748 in Scotland *but it's the same February*.
So the new year celebrated in that 12 month period was used to determine when leap years occurred. Until at least the Gregorian reform European clerks used the Latin Roman Julian Calendar, as in the dates throughout Inter gravissimas linked previously, as few others were literate or numerate, with minor variations such as the assumption that all numbers were ante diem - subtracted from the Kalends, None, or Ides, using Roman counting inclusive of both start and end dates. The leap day was apparently still considered effectively to be added after ante diem sexto Kalendis Martis (February 24), giving ante diem bis sextus Kalendis Martis, second sixth (inclusive count) day before March 1, which is why that is not mentioned in the bull. It was probably not until the common use of Hindu-Arabic numerals replacing Roman numerals in calendars (apparently undocumented so far) when February having 29 days gave rise to the belief that the added day was the 29th.
still observed as HM gov fiscal and taxation year end April 5 (N.S.) as they were not giving up 11 days of taxes in 1751/2!] Just 1752; that was the first year that England changed rule. So 1751 was only 278 days long in England (and had no January or February at all); February 29th 1752 existed throughout the Union.
You mean as January/February/March until 24th were still considered 1750 (O.S.)?
Yes.
Did the Empire change year numbering on January 1 from O.S. to N.S., prior to changing the calendar from Julian to Gregorian on September 14?
Yes: this was specified in the New Calendar Act.
England Scotland
1750-12-31 1750-12-31 1750-01-01 1751-01-01 ... ... 1750-02-28 1751-02-28 1750-03-01 1751-03-01 ... ... 1750-03-24 1751-03-24 1751-03-25 1751-03-25 ... ... 1751-12-31 1751-12-31 1752-01-01 1752-01-01 ... ... 1752-02-28 1752-02-28 1752-02-29 1752-02-29 1752-03-01 1752-03-01 ... ... 1752-03-24 1752-03-24 1752-03-25 1752-03-25 ... ... 1752-09-02 1752-09-02 1752-09-14 1752-09-14 ... ... 1752-12-31 1752-12-31 1753-01-01 1753-01-01 ... ...
Interesting, thanks. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised.

Brian Inglis said:
My understanding (and, no, I don't have references) is that all of Europe had 29th February (whether the leap day is VI Kal.Mar. or 29th February is a notational matter and not relevant) in the same Februaries, so that the 29th February would be in 1743 and 1747 in England but in 1744 and 1748 in Scotland *but it's the same February*.
So the new year celebrated in that 12 month period was used to determine when leap years occurred.
That would appear to be the case, yes.
The leap day was apparently still considered effectively to be added after ante diem sexto Kalendis Martis (February 24), giving ante diem bis sextus Kalendis Martis, second sixth (inclusive count) day before March 1, which is why that is not mentioned in the bull.
It was probably not until the common use of Hindu-Arabic numerals replacing Roman numerals in calendars (apparently undocumented so far) when February having 29 days gave rise to the belief that the added day was the 29th.
Agreed. In my text quoted above I should perhaps have written "... had a 29-day February ...". -- Clive D.W. Feather | If you lie to the compiler, Email: clive@davros.org | it will get its revenge. Web: http://www.davros.org | - Henry Spencer Mobile: +44 7973 377646

On 2020-01-22 11:37, Paul.Koning@dell.com wrote:
On Jan 22, 2020, at 1:32 PM, Matt Johnson-Pint wrote: Hello Time People! Apologies in advance, as I know this is a bit off-topic being not about time zones, but I know that many of you are invested in date and time programming, and I'd appreciate some peer discussion. ... My question for the community is this: Why are Y2K and Y2038 bugs such a hot topic when they are/were one-time events, but yet leap year bugs are rarely discussed even though they are recurring and can have critical impact? People seem to remember 20 years ago, but not 4 or 8 years back. Why?
Are any of you working on leap year related issues? Have you checked your date math for leap year bugs? If not, why?
My guess is that getting leap years right is a simple matter that any competent programmer will understand, while Y2K and Y2038 are not so obvious.
As you said, these others are once in a lifetime issues. It's precisely that point that makes them less understood. Leap years have been encounteredin software for half a century or more; it is to be expected that people know how to get this right.
It wouldn't surprise me to see software that falsely claims 2100 is a leap year, though. Fortunately we have a while to deal with those bugs.
It's apparently a lot worse than we think. Many systems do not accept February 29 at all. People born on that date have continuing problems, including scepticism that anyone is born on that date: https://globalnews.ca/news/2539442/the-hassles-of-being-a-leap-year-baby/ [really hassles of being born on the leap day!] -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised.

Brian Inglis said:
It's apparently a lot worse than we think. Many systems do not accept February 29 at all. People born on that date have continuing problems, including scepticism that anyone is born on that date:
https://globalnews.ca/news/2539442/the-hassles-of-being-a-leap-year-baby/
This isn't a new problem: it was, after all, a major plot point of "The Pirates of Penzance". I once had the opposite problem. I was lying in a hospital bed waiting for (elective day) surgery and the surgeon came round with the consent form to sign. Me: "It isn't a leap year." Him: "What?" Me: "It isn't a leap year. You've dated this 29th February and it's 1st March." Him: <looks> "Oh good grief. You're my fourth patient today and I hadn't noticed." -- Clive D.W. Feather | If you lie to the compiler, Email: clive@davros.org | it will get its revenge. Web: http://www.davros.org | - Henry Spencer Mobile: +44 7973 377646

On 1/22/20 10:32 AM, Matt Johnson-Pint wrote:
Why are Y2K and Y2038 bugs such a hot topic when they are/were one-time events, but yet leap year bugs are rarely discussed even though they are recurring and can have critical impact?
Possibly it's the same reason our nightly news covers shootings and car crashes even though the leading cause of death is heart disease.
Are any of you working on leap year related issues? Have you checked your date math for leap year bugs?
I'm not working on it. In the past I have checked date math for leap year bugs, and errors are common. Leap year bugs can be pretty obscure, though. The most recent leap-year bug I recall fixing in tzcode was to support leap years where the year number can't be expressed in 32 bits. The notion of "leap year" makes no astronomical sense that far in the past or future anyway, so the bug wasn't that big a deal.
participants (5)
-
Brian Inglis
-
Clive D.W. Feather
-
Matt Johnson-Pint
-
Paul Eggert
-
Paul.Koning@dell.com