Speed Calculation of Days from Dates: 15 dates in 35.08 seconds

kinch2002

Premium Member
Joined
Dec 22, 2008
Messages
2,504
Location
Guildford! UK!
WCA ID
2009SHEP01
YouTube
Visit Channel

Not a particularly exciting event to watch, but I thought I'd film myself anyway. I explain what I'm actually doing at the start of the video. Has anyone else tried this?
 
Last edited by a moderator:
That's quite impressive. A couple of years ago when I learned the algorithm, I wrote an app to train myself. The last record that I actually have a written record of is a 5.8 second average of 20. Also my app tested dates between 1600 and 2100.

(For bonus points, does anyone know why it's pointless to do day of week calculations before 1600 [and even between 1600 and the mid 1700s] using this algorithm?)

Hint:
If you have access to a UNIX system, type "cal 9 1752" in the terminal and check out what happens
 
Last edited:
Unfortunately Excel doesn't recognise dates before 1900 :(

For bonus points:
Gregorian calendar only started in the year 15xx? Also I think they added /took away 13 days or something at some point
 
15 dates in 35.08 seconds

The last record that I actually have a written record of is a 5.8 second average of 20.
If you have access to a UNIX system, type "cal 9 1752" in the terminal and check out what happens

How long did both of you practice to get that fast?

I wasn't aware of "cal", thanks for the tip. :)

Unfortunately Excel doesn't recognise dates before 1900 :(

The next time I see you mention Excel, I'm going to fly over to the UK and beat you with a book of a proper programming language. :P
 
How long did both of you practice to get that fast?
The next time I see you mention Excel, I'm going to fly over to the UK and beat you with a book of a proper programming language. :P
I've put several hours into this. Maybe 5 hours. I hope to get down to averaging sub-30 for 15 dates soon, and I think that might take another 10 hours practise. At work I'm on emails 10% of the day, SQL Server 20% of the day and Excel for the other 70%. I can't help it if I like it too much. At least it's user friendly :)
 
Back
Top