2015-03-14

It's Not Pi Day

Americans have declared this to be a 'Super Pi Day' (3-14-15).
Not in my date system! 




ISO-8601 is a formal standard for the only sane way to write dates and times.

Today is 2015-03-14.
Right now, it's 2015-03-14T11:37:01.
The ordinal date is 2015-073.
This week is 2015-W11.

They're general to specific, which just makes sense.



When these dates are used in file names and other strings, alphanumeric sorting automatically orders them in time (at least for the next eight millennia... then the standard will need to be updated to a default five digits for the year!).

UPDATE: Neil deGrasse Tyson agrees:

When Is Pi Day?


Fortunately, a Python list comprehension will tell us when the REAL Super Pi Day occurs.

p = list(str(N(pi,digits=100)/10))[2:]
pidays = [''.join(p[:i]+['-']+p[i:i+2]+['-']+p[i+2:i+4]) for i in range(0,len(p)-4) if(p[:i]!=[] and 0<int(''.join(p[i:i+2]))<=12 and 0<int(''.join(p[i+2:i+4]))<=31)]
show(pidays)


In the first 1000 digits of pi, there are 41 Pi Days.
In the first 100 digits of pi, only one Pi Day appears:

31415926535897932384626433832795028841971693993751058209749445923078164-06-28

 See you on June 28th in 3*10^70 years!
(note: the universe is only 10^10 years old)


Non-Calendar Pi Days


How about ordinal Pi Days?

numdigits=100
p = list(str(N(pi,digits=numdigits)/10))[2:]
pidays = [''.join(p[:i]+['-']+p[i:i+3]) for i in range(0,len(p)-4) if(p[:i]!=[] and 0<int(''.join(p[i:i+3]))<=365)]
show(pidays[0:5])
print "There are " + str(len(pidays)) + " ordinal Pi Days in the first " + str(numdigits) + " digits of pi"


There are 34 ordinal Pi Days in the first 100 digits of Pi (which makes sense!).
We missed 3-141 (Year 3, May 21) and 314-159 (Year 314, June 08), but the next ordinal pi day is just around the corner on 314159265-358 (Year 314159265, December 24th).

And week date Pi Days?

numdigits=100
p = list(str(N(pi,digits=numdigits)/10))[2:]
pidays = [''.join(p[:i]+['-W']+p[i:i+2]+['-']+p[i+2:i+3]) for i in range(0,len(p)-4) if(p[:i]!=[] and 0<int(''.join(p[i:i+2]))<=52 and 0<int(''.join(p[i+2:i+3]))<=7)]
show(pidays[0:5])
print "There are " + str(len(pidays)) + " week date Pi Days in the first " + str(numdigits) + " digits of pi"


0003-W14-1 (0003-03-30)
0031-W41-5 (0031-10-09)
314159-W26-5 (314159-06-??)

Of course, pi is the wrong number to get excited about anyway.


When Is Tau Day?


τ, the more natural choice for a constant than pi.

next calendar date:
62831853-07-17
Much sooner than calendar pi day.

next ordinal date:
6283-185 (6283-07-04)U-S-A!  U-S-A!

next week date:
6283-W18-5 (6283-05-05)
A busy year for tau fans!


When Is e Day?


Ah, Euler's Number—the base of the natural logarithm.

Calendar date:
27182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274274663919320-03-05
It's 10^42 times further off than the next calendar pi day!

Ordinal date:
2718-281 (2718-10-08)
Practically tomorrow!

Week date:
2718-W28-1 (2718-07-08)
Of the dates determined, this is the closest of all.


List comprehensions!  Learn some Python and automate all kinds of tedious string manipulations.  The Python documentation is good and there are all kinds of free interactive online Python textbooks out there.  Sage Math Cloud is a great place to play without installing anything—I did the manipulations above in this Sage Math worksheet.