[EMAIL PROTECTED] wrote:
>
> Sounds good .. and it's as simple as using
> DateTime->today as the base, which may well be a
> good default behaviour for ->to_datetime when no
> base is in the object or none is passed in the call.
So this is what we've got so far:
0.0102 2003-11-06
- to_datetime() uses "today" as a base date, if none was given.
The following methods are affected by this change:
epoch, hires_epoch, is_dst, utc_rd_values, utc_rd_as_seconds,
sprintf("%s")
- can_be_datetime()
- has_date(), has_time()
- defined_fields() method, contributed by Rick Measham
- to_datetime() sets fields in a known order,
instead of hash-order. Based on a patch by Rick Measham
- Included has() method, contributed by Rick Measham
0.0101 2003-11-03
- runs in Perl 5.00503.
Dave Rolsky & Flavio S. Glock, creating a cvs conflict :)
- there is no set_locale() in DateTime.
Modified from a patch by Rick Measham
- fixed an infinite loop in _format_nanoseconds.
Patch by Rick Measham
This is a sample of the new API:
$dti = $dti->to_datetime;
if ( $dti->can_be_datetime )
{
$dti = $dti->to_datetime
}
else
{
print "only @{[ $dti->defined_fields ]} are set"
}
if ( $dti->can_be_datetime && $dti->has_date ) ...
if ( $dti->has_date && $dti->has_time ) ...
if ( $dti->has_year ) ...
if ( $dti->has( qw( year month day hour ) ) ) ...
- Flavio S. Glock