Re: How to find out the next Friday using RelativeDateTime

2006-03-23 Thread fumanchu
> a = now() > delta = ReltaiveDateTime(days=+6, weekday(mx.DateTime.Friday, 0)) > Next Friday: a+delta > a: march 23 > a+delta: Gives me March 31st and not March 24th > Any ideas? Just an off-beat idea: use Python's datetime instead of mx.DateTime, and my recur module: http://projects.amor.org/mis

Re: How to find out the next Friday using RelativeDateTime

2006-03-23 Thread John Machin
On 24/03/2006 6:30 AM, vj wrote: > I figured out how to do it. This does not work: > > delta = ReltaiveDateTime(days=0, weekday(mx.DateTime.Friday, 0)) > > But this works: > > delta = ReltaiveDateTime(days=+0, weekday(mx.DateTime.Friday, 0)) > vj, NEITHER of those work, because you still have

Re: How to find out the next Friday using RelativeDateTime

2006-03-23 Thread vj
Thanks for pointing out that the days=+0 is not necessary. Your other points are well noted. Thanks VJ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find out the next Friday using RelativeDateTime

2006-03-23 Thread John Machin
On 24/03/2006 5:18 AM, Dennis Lee Bieber wrote: > On 23 Mar 2006 09:37:13 -0800, "vj" <[EMAIL PROTECTED]> declaimed the > following in comp.lang.python: > > >>I'm doing: >> >>a = now() >>delta = ReltaiveDateTime(days=+6, weekday(mx.DateTime.Friday, 0)) >>Next Friday: a+delta >> >>a: march 23 >>a+

Re: How to find out the next Friday using RelativeDateTime

2006-03-23 Thread vj
I figured out how to do it. This does not work: delta = ReltaiveDateTime(days=0, weekday(mx.DateTime.Friday, 0)) But this works: delta = ReltaiveDateTime(days=+0, weekday(mx.DateTime.Friday, 0)) -- http://mail.python.org/mailman/listinfo/python-list

How to find out the next Friday using RelativeDateTime

2006-03-23 Thread vj
I'm doing: a = now() delta = ReltaiveDateTime(days=+6, weekday(mx.DateTime.Friday, 0)) Next Friday: a+delta a: march 23 a+delta: Gives me March 31st and not March 24th Any ideas? -- http://mail.python.org/mailman/listinfo/python-list