Re: datelib pythonification

2010-03-09 Thread alex goretoy
>>> 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,

Re: datelib pythonification

2010-03-09 Thread alex goretoy
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

Re: datelib pythonification

2010-03-09 Thread alex goretoy
> > 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(

Re: datelib pythonification

2010-02-21 Thread John Machin
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

Re: datelib pythonification

2010-02-20 Thread alex goretoy
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()