John Siracusa schreef: > All the various DateTime::Format::* modules are nice, but I've been > thinking that it would be even nicer if DateTime had some sort of > rudimentary parsing built in.
On Sun, 2003-07-13 at 20:47, Eugene van der Pijll wrote: > I agree with this; the DateTime constructor tends to get a little > verbose. However, I don't quite agree with your implementation ideas. [snip] > My suggestion would be to have a small, very restrictive parse_datetime > method, which is more-or-less the reverse of the datetime() method. [snip] > $dt = DateTime->parse_datetime( "2003-07-13T12:38:00" ); > > I wouldn't use this method for user input, but only to create fixed > dates in my programs. Yup, this all looks excellent. Unless your input comes from a user or from a file or some other source this contructor would be great. I often enter a date by hand that is a static date, with this I can do it quickly. Cheers! Rick
