2008/9/2 Wayne Watson <[EMAIL PROTECTED]>: > Is there some method or function that checks whether a date is valid. For > example, these are not valid (yyyy/mm/dd format here for reference.): [...] > Perhaps a Try is useful with some function?
Yup. Have a look at time.strptime. Don't be afraid to look through the standard library documentation. If you're doing stuff with times and dates, reading through the time and datetime modules would be very helpful. (generally you will want to use datetime. The time module is at a lower level, although it is still the place to go for docs on strptime/strftime format strings) -- John. _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
