I know that Phaedon Sinis's new package for quantitative finance in
Sage, which he intends to submit within about 2 weeks, has lots of
more sophisticated date/time handling than what is builtin to Python,
at least stuff motivated by finance. I'm guessing you're also
interested in datetime functionality motivated by finance. So
Phaedon, care to make any remarks?
William
sage: current_time()
Time to buy a watch!
Already done :)
sage: !cal 9r 1752r
September 1752
Su Mo Tu We Th Fr Sa
1 2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Jason
This works:
----------------------------------------------------------------------
| Sage Version 3.3, Release Date: 2009-02-21 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: from matplotlib.dates import relativedelta as rd
sage: rd
<class dateutil.relativedelta.relativedelta at 0xc01ef2c>
Also, this works:
sage: from dateutil import relativedelta as rd
sage: rd.<TAB>
rd.FR rd.TH rd.datetime rd.x
rd.MO rd.TU rd.relativedelta
rd.SA rd.WE rd.weekday
rd.SU rd.calendar rd.weekdays
sage: rd.relativedelta
<class dateutil.relativedelta.relativedelta at 0xa2598cc>
So it looks like you want the module matplotlib.dates or the module
dateutil.relativedelta
Jason