Hacker News new | past | comments | ask | show | jobs | submit login




Python 2.7 shows 10,000 days.

    >>> datetime(2011, 9, 30) - datetime(1984, 5, 14)
    datetime.timedelta(10000)


By subtracting the day he was born you're not counting it. You're making it 'day 0'. 2 days - 0 days = 2 days.


Also, Ruby 1.9.2 shows 10,000 days.

    irb(main):017:0> (Time.utc(2011, 9, 30) - Time.utc(1984, 5, 14)) / 60 / 60 / 24
    => 10000.0


So does PHP!

    echo date_diff(date_create('1984-05-14'), date_create('2011-09-30'))->format('%a days');
    => 10000 days
Is this silly yet? ;)


Wolfram Alpha has a bug.

http://www.wolframalpha.com/input/?i=May+14%2C+1984 shows it being 10,000 days ago (if you view it before midnight on the 1st), but performing explicit ranges shows a different number.


If I were to say 1 day ago, I would mean yesterday, which would mean we were on day 2. Thus yesterday would have been day 10001.


I think what he actually wanted was http://www.wolframalpha.com/input/?i=May+14+1984+plus+9999+d...

Which would be 10000 days inclusive of May 14. (Wolfram says in this case that it was Sept. 29, which is correct. (ie Mark is celebrating the wrong day. But kudos to him for being aware of it in the first place. I celebrated mine July 23.))


That's wrong if you do the math yourself. Try this: http://www.wolframalpha.com/input/?i=Sept+30%2C+1984+to+toda...

It says 9855 days, which is 365 * (2011 - 1984), which is obviously not right and missing leap years.


The correct formula that Wolfram should be using here is floor((cur_yr - old_yr)x365.25), assuming you are interested only in the recent past where the 365.25 holds true.

As an aside, floor(365.25x(2011-1984))+138 gives 9,999 days elapsed which would make today the 10,000th day, as stated by Zuckerberg.

EDIT: this formula only works when you begin on a day after a leap day during a leap year, thanks hennypenny


Your formula doesn't work. There have been 7 leap days including 1984. The date of the leap day is relevant to your formula because if he were born on Jan 1 there would be a difference in your result. Also, May 14 plus 138 days would have been September 29, not Sept 30.


This has to do with when you take the starting point for the day I would assume. Also, I got the number from Wolfram:

http://www.wolframalpha.com/input/?i=May+14+1984+to+Septembe...


In the this case 'to' means 'through' and is inclusive of all the days. By adding the difference we do not twice count the number we arrived at from the first part of your calculation.


What units are "[specific date] to today" in? Does converting that to days take into account leap years? A more natural query:

http://www.wolframalpha.com/input/?i=days+since+May+14%2C+19...





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: