Rick Measham wrote:
>
> I'm adapting Strptime to return DateTime::Incomplete objects when it
> gets an incomplete datetime. The old behaviour was to return the lowest
> possible value.
>
> eg. 'November 2003' used to return 2003-11-01T00:00:00, but will now
> return 2003-11-xxTxx:xx:xx
>
> I'm currently checking to see if a datetime is possible and only
> returning incomplete if not. Is that a good idea?
>
> If so, maybe a method inside Incomplete would be good:
> if ($dti->can_be_datetime) {
> $dti->become_datetime
> }
> or else an incomplete could automatically convert itself to a DateTime
> once it had enough information?!?!?
I think automatic conversion is not a good thing. I'm thinking about the
other alternatives...
The patches were applied - thanks.
- Flavio S. Glock