>>> import datelib
>>> datelib.datelib().dates_list()
[datetime.date(2009, 3, 10), datetime.date(2009, 4, 10), datetime.date(2009,
5, 10), datetime.date(2009, 6, 10), datetime.date(2009, 7, 10),
datetime.date(2009, 8, 10), datetime.date(2009, 9, 10), datetime.date(2009,
10, 10), datetime.date(2009,
I have another quick question. What would be the best way to implement dates
length function?
or should i just leave that up to the user using the lib?
-Alex Goretoy
--
http://mail.python.org/mailman/listinfo/python-list
>
> DATE_TYPE = type(date.today())
def dates_diff(self, *targs):
nargs = len(targs)
if nargs == 0:
return self.enddate - self.startdate
if nargs == 1:
arg = targs[0]
if not isinstance(arg, (list, tuple)) or len(arg) != 2:
raise Exception(
On Feb 21, 12:37 pm, alex goretoy wrote:
> hello all,
> since I posted this last time, I've added a new function dates_diff and
[SNIP]
I'm rather unsure of the context of this posting ... I'm assuming that
the subject "datelib pythonification" refers t
hello all,
since I posted this last time, I've added a new function dates_diff and
modified the dates_dict function to set timedelta values returned by
dates_diff in the returned dict
def dates_dict(self,*targs,**dargs):
"""
dates_dict() - takes params same as prefs()