The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Monday, March 18, 2013

You know, you might want to check the calendar for March 2002

Okay, I've seen this particular meme multiple times now on GoogleFacePlusBook:

THIS IS THE ONLY TIME WE WILL SEE AND LIVE THIS EVENT

Calendar for March 2013

March 2013
Sun Mon Tue Wed Thr Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

This year March has 5 Fridays, 5 Saturdays and 5 Sundays. This happens once every 823 years. This is called money bags. So, share this to your friends and money will arrive within 4 days. Based on Chinese “Feng Shui.” The one who does not share … will be without money.

The first time I saw it, I thought, Weird—is that true? Really? 823 years since the last time? Okay, let's write some code to answer this—which years has March 1st fallen on a Friday?

#!/usr/bin/env lua

function dayofweek(date)
  local a = math.floor((14 - date.month) / 12)
  local y = date.year - a
  local m = date.month + 12 * a - 2

  local d = date.day
          + y
          + math.floor(y / 4)  
          - math.floor(y / 100)
          + math.floor(y / 400)
          + math.floor(31 * m / 12)
  return (d % 7) + 1
end

for year = 1190,2014 do
  if dayofweek { year = year , month = 3 , day = 1 } == 6 then
    print(year)
  end
end  

1190 is 823 years ago. Let's see what we get …

1191 1196 1202 1213 1219 1224 1230 1241 
1247 1252 1258 1269 1275 1280 1286 1297 
1309 1315 1320 1326 1337 1343 1348 1354 
1365 1371 1376 1382 1393 1399 1405 1411 
1416 1422 1433 1439 1444 1450 1461 1467 
1472 1478 1489 1495 1501 1507 1512 1518 
1529 1535 1540 1546 1557 1563 1568 1574 
1585 1591 1596 1602 1613 1619 1624 1630 
1641 1647 1652 1658 1669 1675 1680 1686 
1697 1709 1715 1720 1726 1737 1743 1748 
1754 1765 1771 1776 1782 1793 1799 1805 
1811 1816 1822 1833 1839 1844 1850 1861 
1867 1872 1878 1889 1895 1901 1907 1912 
1918 1929 1935 1940 1946 1957 1963 1968 
1974 1985 1991 1996 2002 2013

(okay, I cleaned up the output a bit)

Well … it's happened 118 times since 1190, and it didn't happen 823 years ago, but 822 years ago, and 817 years ago and … you get the picture.

Hardly a rare occurrence and in thinking about it, any month with 31 days will have three days that happen five times a month (five Sundays, five Mondays and five Tuesdays for instance).

Now, I can hope this puts this particularly medium meme (it's not rare, and it's not well done) out of commission. But alas, I doubt it …

Obligatory Picture

An abstract representation of where you're coming from]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

Obligatory AI Disclaimer

No AI was used in the making of this site, unless otherwise noted.

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: https://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

https://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.