6 Mar
2003
6 Mar
'03
1:48 a.m.
Peter Bengtsson wrote:
At 02:01 2003-02-28 -0600, Edward Muller wrote:
Does anyone know of a good module/product/hack that I can feed a date to and it will let me know if it's valid or not?
It should check leap years ... end days of the month and the like...
try: ok_date = context.ZopeTime('2003/13/13') print "Yes, date OK" except: print "No, not OK"
return printed
Nope, ZopeTime(DateTime) is very (too) liberal in what it accepts for this purpose: context.ZopeTime('2002/30/3') returns "2002/03/30" cheers, oliver