How to find out the next Friday using RelativeDateTime

fumanchu fumanchu at
Thu Mar 23 21:02:48 CET 2006

> 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:

>>> import datetime, recur
>>> recur.Recurrence(, "Friday").next(), 3, 24)

Robert Brewer
System Architect
Amor Ministries
fumanchu at

More information about the Python-list mailing list