Re: Re: Strptime issues

2003-11-06 Thread rickmeasham
Flavio S. Glock [EMAIL PROTECTED] wrote: How about to extend the 'to_datetime' method, instead of creating a new one: if ($dti-can_be_datetime) { $dti = $dti-to_datetime } Sounds good .. and it's as simple as using DateTime-today as the base, which may well

Re: Re: Re: Strptime issues

2003-11-04 Thread rickmeasham
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: sub has_time { $_[0]-has{'hour', 'minute'} } Maybe should be: sub has_time { return 1 if ($_[0]-has('hour', 'minute') and not $_[0]-has('nanosecond')); return 1 if ($_[0]-has('hour', 'minute', 'second')) return 0 } Which only

Re: Re: Strptime issues

2003-11-03 Thread rickmeasham
David Hood [EMAIL PROTECTED] wrote: Perhaps you should return only the information that is given, in an iso 8601 compliant format, so for November 2003 you could simply return 2003-11. The Nah, that's not going to happen. The entire point of the module is to get a DateTime object.