On 7/15/04 5:40 PM, Dave Rolsky wrote: > DateTime has a strftime() method to format existing DateTime objects but no > coresponding strptime() method to read in formatted date strings. You have to > go find the DateTime::Format::Strptime module. > > It would be really nice if strptime() was built into DateTime probably by > absorbing DateTime::Format::Strptime. This would round out the input/output > interface nicely.
This brings back to mind (well, my mind, anyway) the earlier discussion of adding a parse() method to DateTime, with pluggable parsers and a simple default parser included with DateTime. I dislike the strwhatever method names, and only tolerate them as a sop to those who what the exact semantics of the equivalent C functions. IMO, the "input" method for DateTime should me more flexible than strptime(). (I also think that DateTime *should* have an "input" method, although this view is not shared by others, IIRC.) -John
