# Did Y2K Account for the unLeap Year?

**URL:** <https://boards.straightdope.com/t/did-y2k-account-for-the-unleap-year/764458>\
**Category:** Factual Questions\
**Created:** [August 30, 2016, 3:20am UTC](https://boards.straightdope.com/t/did-y2k-account-for-the-unleap-year/764458 "2016-08-30T03:20:03Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![Telemark](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/telemark/32/372_2.png) [@Telemark](https://boards.straightdope.com/u/Telemark)\
**Post date:** [August 30, 2016, 5:33pm UTC](https://boards.straightdope.com/t/did-y2k-account-for-the-unleap-year/764458/21 "2016-08-30T17:33:33Z")

</div>

Most significant systems use Network Time Protocol so leap seconds are adjusted for accordingly.

---

<div class="post-metadata">

**Author:** ![TimeWinder](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@TimeWinder](https://boards.straightdope.com/u/TimeWinder)\
**Post date:** [August 30, 2016, 5:46pm UTC](https://boards.straightdope.com/t/did-y2k-account-for-the-unleap-year/764458/22 "2016-08-30T17:46:01Z")

</div>

> [@watchwolf49](#):
>
> Actually, the _ **real** _ date the all of civilization comes crashing down is January 19th, 2038 … a fairly good chunk of us should be still alive.

I know this was tongue-in-cheek, but I wouldn’t worry about it. Every modern system has had (and recommended) the APIs for dealing with larger date ranges for some years, and there are lots of transactions (mortgages, leases, prison terms…) for which dates beyond 2038 are already being stored in computers without problem.

Like Y2K, there will be some scrambling at the end, and a few old apps that can’t handle the transition, but little widespread disaster.

---

<div class="post-metadata">

**Author:** ![mixdenny](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mixdenny/32/2962_2.png) [@mixdenny](https://boards.straightdope.com/u/mixdenny)\
**Post date:** [August 30, 2016, 6:07pm UTC](https://boards.straightdope.com/t/did-y2k-account-for-the-unleap-year/764458/23 "2016-08-30T18:07:21Z")

</div>

> [@Jinx](#):
>
> We won’t be around to see the panic if I found a loophole, but did the Y2K bug adjustment account for future century years that SHOULD be leap years by conventional wisdom, but WON’T be leap years by the book? Is this yet another little time bomb awaiting to reek havoc in the streets of our self-driving car (or, flying car) future? :eek:

I think the main problem back then was that many programs only used 2 digits for the year, thus 2000 was going to store as 00, which would have been before 99 (1999) in a date comparison. At that time, most programs were still descended from the dawn of personal computers only 25 years earlier when every byte was expensive.

My 1981 IBM PC had 16k, I could only dream of a 64k memory. And a cassette tape drive.

Dennis

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [August 30, 2016, 7:21pm UTC](https://boards.straightdope.com/t/did-y2k-account-for-the-unleap-year/764458/24 "2016-08-30T19:21:01Z")

</div>

> [@pulykamell](#):
>
> You can even save a couple more characters and drive people even more nuts trying to figure out your code and what the hell it means with y%(y%25?4:16).

Bravo! I am humbled and chagrined.

---

<div class="post-metadata">

**Author:** ![leahcim](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@leahcim](https://boards.straightdope.com/u/leahcim)\
**Post date:** [August 30, 2016, 8:50pm UTC](https://boards.straightdope.com/t/did-y2k-account-for-the-unleap-year/764458/25 "2016-08-30T20:50:42Z")

</div>

> [@pulykamell](#):
>
> You can even save a couple more characters and drive people even more nuts trying to figure out your code and what the hell it means with y%(y%25?4:16).

If feel like you could do the outer modulus even more incomprehensibly with bitmasks (even if it means a few more characters).

---

<div class="post-metadata">

**Author:** ![gazpacho](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@gazpacho](https://boards.straightdope.com/u/gazpacho)\
**Post date:** [August 30, 2016, 9:37pm UTC](https://boards.straightdope.com/t/did-y2k-account-for-the-unleap-year/764458/26 "2016-08-30T21:37:38Z")

</div>

> [@septimus](#):
>
> Bloatware. :rolleyes: Why not just  
> #define NOTLEAP(Y) (Y%(Y%100?4:400))

This makes the baby Jesus cry.

---

<div class="post-metadata">

**Author:** ![Telemark](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/telemark/32/372_2.png) [@Telemark](https://boards.straightdope.com/u/Telemark)\
**Post date:** [August 30, 2016, 11:56pm UTC](https://boards.straightdope.com/t/did-y2k-account-for-the-unleap-year/764458/27 "2016-08-30T23:56:06Z")

</div>

Some engineers take calendars and leap years very seriously. Please not the date the bug report (SPR) was filed. I loved my old company.

[https://www-users.cs.york.ac.uk/susan/joke/decly.htm](https://www-users.cs.york.ac.uk/susan/joke/decly.htm)

[Previous page](https://boards.straightdope.com/t/did-y2k-account-for-the-unleap-year/764458.md?page=1)
