> Probably for unambiguous cases we should just allow:
>
>  $iso->parse_datetime($string)

I did that.

> For more complex cases we can do:
>
>  $iso->parse_datetime( datetime => $string,
>                        ... # extra params
>                      )

I went with $iso->parse_time as the 6 ambiguous strings are either dates or times.  
The default is to parse them as dates (what ->parse_datetime does), if you really want 
them to be times you can use this method.

> This probably works better than many methods, in this case, because there
> seem to be many combinations of different parameters (format, base object,
> timezone, etc.) so trying to method-ize those would generate a ridiculous
> number of methods.

Yep.  It seemed easier to build a regex for each format.

-J

--

Reply via email to