Wanting to find out exactly how long Tiger has been available, I tried out some date math in Python. The answer? It’s 618 days, as of today’s date.
Previously, I’ve done my date math in AppleScript, but Python is quicker for me now that I know what to do. I post this to help remind me how to do date math, because I’m very forgetful.
% python
Python 2.3.5 (#1, Mar 20 2005, 20:38:20)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import date
>>> a = date(2005, 4, 25)
>>> b = date.today()
>>> print b - a
618 days, 0:00:00
>>>