DateTime
view release on metacpan or search on metacpan
between DateTime's string overloading and
Test::Builder->cmp_ok(). See RT 19626.
0.33 2006-08-09 (the "Asia/Kaohsiung" release)
[ ENHANCEMENTS ]
- Attempting to do an overloaded operation (add, subtract, compare)
with an inappropriate argument (like $dt + 1) gives a more useful
error message.
[ BUG FIXES ]
- The fixes in 0.30 for subtract_datetime() crossing a DST change had
a bug. When subtracting two dates, both occurring on a DST change
date, but where the dates did not cross the change, the answer was
off by an hour. Reported by Chris Prather. See RT 20697.
- Borrowed a tweak from version.pm's Makefile.PL to make compiler
detection work with MSVC.
0.32 2006-07-24
[ BUG FIXES ]
- Change how C compiler detection is done in the Makefile.PL so it
does not rely on having make on the system. The new way should work
on (most?) Unix and Win32 systems. Suggested by David Golden. See RT
18969.
0.31 2006-05-21
[ ENHANCEMENTS ]
- Switched some uses of die() to Carp::croak(), where
appropriate. This should make error messages more useful in many
cases. Based on a suggestion by Max Maischein. See RT tickets 11692
& 18728.
[ BUG FIXES ]
- Removed all uses of UNIVERSAL::isa and UNIVERSAL::can as functions.
- Tweaked 20infinite.t test to give more useful output for some
failures, though it probably doesn't fix them. See RT 17390.
0.30 2005-12-22
[ ENHANCEMENTS ]
- Expanded and rewrote the docs on date math to try to explain exactly
how DateTime.pm works, and in particular cover the problems DST
introduces to various types of date math. The docs now also include
some specific recommendations on getting sane results from datetime
math.
- Added calendar_duration() and clock_duration() methods to
DateTime::Duration
- Explicitly override the stringification method for
DateTime::Infinite objects. They now stringify as whatever the IEEE
infinity and negative infinity numbers stringify to on your
platform. On Linux this is "inf" and "-inf". CPAN RT #16632.
[ BUG FIXES ]
- delta_md() and delta_days() did not always return correct values
when crossing a DST change.
- The pure Perl version of the code had a dependency ordering problem
where DateTime::LeapSecond depended on other pure Perl code that
wasn't yet available. I'm not sure how this ever worked.
- Remove mentions of leap second on 1971-12-31 from the docs, because
there was no leap second that day. Reported by Mike Schilli.
- If you added a second to a datetime that was on a leap second (like
2005-12-31T23:59:60) it got "stuck" and kept returning the same
datetime. Reported by Mike Schilli.
- Changes to the tests in 20infinite.t may fix failures seen on some
platforms and with new versions of Test::More (0.62 was known to
cause failures)
[ *** BACKWARDS INCOMPATIBILITIES *** ]
- The subtract_datetime() method switched back to using the local
portion of the date _and_ time, but it now accounts for days with
DST changes specially. This produces results that fix the bugs that
were fixed by previous subtraction changes in 0.28 and 0.29, but
without introducing even more bugs. The overall result should be
sane, but please see the docs for details.
0.2901 2005-07-04
- A leap second for the end of 2005 was announced.
0.29 2005-06-03
[ *** BACKWARDS INCOMPATIBILITIES *** ]
- When adding/subtracting a duration with months or days that crossed
a DST change, the result was based on the local time, not the UTC
time. For consistent results, it is necessary to use the UTC time
(but local date) for all date math. Reported by J. Alexander
Docauer.
0.28 2005-02-27
[ ENHANCEMENTS ]
- The era names for the era() method are now retrieved from the
DateTime.pm object's associated locale. The old era() method, which
was hard-coded to use BCE and CE, is renamed secular_era(). The
[ BUG FIXES ]
- truncate( to => 'week' ) caused a fatal error when the beginning of
the week was in the previous month. Reported by R. Mathews
(rt.cpan.org #3843).
0.1702 2003-09-18
[ IMPROVEMENTS ]
- Added truncate( to => 'week' ). Suggested by Flavio Glock.
0.1701 2003-09-15
[ BUG FIXES ]
- If from_epoch was given a fractional epoch with a floating point
value with more than 9 digits after the decimal point, the object
ended up containing a floating point number of nanoseconds. We now
truncate this number to an integer. Fixed by Joshua Hoblitt.
- The %V strftime specifier was documented, but not implemented.
Reported by Joshua Hoblitt.
- Test #56 in 03components.t would die with "Invalid offset: -124"
when run with DateTime::TimeZone 0.2502+. Next time, I'll read my
own docs ;)
0.17 2003-08-29 (the "math is hard" release)
[ BACKWARDS INCOMPATIBILITIES ]
- The default end_of_month mode for negative durations is now
"preserve". This makes more sense, as the previous default meant
that the following code:
print DateTime->new( year => 2003, month => 5, day => 31 )
->subtract( months => 1 )->ymd;
printed "2003-05-01" as opposed to "2003-04-30". Thanks to Thomas
Klausner for starting a discussion on this problem.
- The subtract_datetime method now returns different results, as does
subtraction overloading when both sides of the subtraction are
DateTime objects.
The subtract_datetime_absolute method returns results similar to
what was previously returned from subtract_datetime.
Thanks to Matthew McGillis for bringing this up, and Joshua Hoblitt
and Eugene van der Pijll for contributing to the ensuing discussion.
[ IMPROVEMENTS ]
- DateTime.pm compare() method is now documented to work with any
other calendar class that provides a utc_rd_values() method.
- Added the subtract_datetime_absolute method. See the docs for
details.
- Documented the inverse() method in DateTime::Duration.
0.1601 2003-08-07
[ BUG FIXES ]
- On platforms like Win32, where we can't find a finite() or
isfinite() function/macro, the DateTime::LeapSecond code wasn't
being loaded, so many tests failed. Reported by Ron Hill.
0.16 2003-08-06
[ IMPROVEMENTS ]
- The XS code now implements leap second-related calculations.
However, this is only used on platforms where we can find a usable
finite() or isfinite() function/macro, so it isn't used on Win32.
- This distro has now borged the DateTime::LeapSecond module. It is
only loaded when the XS leap second code cannot be used.
- Other miscellaneous performance improvements.
0.1503 2003-07-31
[ BUG FIXES ]
- Adding a duration with delta months to an infinite DateTime was
quite broken. Reported by Eugene van der Pijll.
0.1502 2003-07-31
[ BUG FIXES ]
- XSLoader wasn't the problem on Solaris, so it's back.
- Now loading the XS version of DateTime.pm is wrapped in an eval
block. If it fails with an error about the object version not
matching, the pure Perl version is loaded instead. This should fix
Solaris. Thanks to Joshua Hoblitt for identifying this bug.
0.1501 2003-07-30
[ BUG FIXES ]
- Fixed the from_object() method to set the returned object's time
zone to the floating time zone if the source object did not have a
time zone, as specified in the docs. Previously, the returned
object's time zone was UTC. Patch by Eugene van der Pjill.
- For this release, at least, the module always uses Dynaloader. This
- If datetime math was done with hours, minutes, or seconds, the
return value of ->epoch would be wrong after this. Based on report
and patch from Iain Truskett.
0.08 2003-03-21 (the "anti-war" release)
[IMPROVEMENTS]
- All set/modify methods now return the datetime object, in order to
make method chaining possible. Patch by Iain Truskett.
- The _greg2rd and _rd2greg methods have been renamed _ymd2rd and
_rd2ymd, so as to make them look more normal when used in
subclasses.
- Added a truncate() method. Suggested by Flavio Glock.
- Added Swedish language module. Contributed by Christian Hansen.
- Added language modules for Afar, Amharic, Gedeo, Oromo, Sidama,
Somali, and Tigrinya (Eritrean and Ethiopian), all courtesy of
Daniel Yacob.
- Various doc improvements, including a section on invalid local
times.
[BUG FIXES]
- The week() method was wrong for many dates. Reported by Christian
Hansen.
- The last_day_of_month() method had the DateTime class hard-coded in
it. Reported by Eugene van der Pijll.
- Fixed a bug when comparing a datetime object to infinity (or
negative infinity). Fixed by Flavio Glock.
- Date math has been fixed so that it affects the _local_ times. This
means that sometimes 1 day is not equal to 24 hours when the
addition/subtraction crosses over a Daylight Saving Time change.
See the "How Date Math is Done" section of the docs for more
details.
[BACKWARDS INCOMPATIBILITIES]
- Objects constructed via the new() method now have a "floating" time
zone by default, instead of using the "local" time zone. This is
just simpler to deal with, and for code where time zones are
unimportant, this is the most appropriate default.
0.07 2003-02-26
[IMPROVEMENTS]
- Added a small hack to the compare() method so that this module can
be used with Set::Infinite.
- Changed compare so that it can be used to compare two objects from
different calendars that conform to the DateTime::Calendar
interface.
- Added explanation of exactly what calendar this module represents
("proleptic Gregorian calendar") to docs.
- Added a Spanish language DateTime::Language subclass. Implemented
by Flavio S. Glock.
- Added support for specifying a language by ISO code ("en" or
"pt-br") as well as the subclass name. Based on a patch from Eric
Cholet.
- Revamped the externally visible DateTime::Language API.
- Objects created via the from_object() method are set to the time
zone of the object from which they were created, if it has one, or
UTC otherwise.
[BUG FIXES]
- The from_object() method was broken because it retrieved a UTC
datetime from the object passed in, and then created a new DateTime
object using that UTC time as a _local_ time.
[BACKWARDS INCOMPATIBILITIES]
- Removed stringification overloading. Having this in place made it
impossible to create a strack trace in much of the time zone code.
- Renamed the DateTime::Language->subclasses method as languages.
- It is no longer possible to directly instantiate a
DateTime::Language subclass, instead use:
my $en = DateTime::Language->new( language => 'English' );
- The from_object() method no longer accepts a "time_zone" parameter.
0.06 2003-02-16
- The docs said that there was no year 0 in the Gregorian calendar,
but that was wrong. The year() method can now return 0. The
year_0() method has been removed.
- Added jd() and mjd() methods.
- Re-implemented some of the core code in XS for speed.
0.05 2003-02-13
- Fix handling and reporting of epoch times. Epoch times are, by
definition, UTC times, so any time created from an epoch should
always have its time zone set to "UTC". This can be changed after
the object is created. Similarly, the value returned by the epoch()
method needs to be based on the object's UTC time, not it's local
time. Bug reported by Kellan Elliott-McCrea.
- Change year_0 so that -1 BCE is 0, not 1 CE. This corresponds to
astronomical years.
- Change ymd, dmy, mdy, and iso8601 to use Gregorian years (..., -2,
-1, 1, 2, ... ) as opposed to astronomical years. Also make sure
all negative years are formatted as 4 digits.
0.04 2003-02-10
- Explicitly set time zone for objects created during tests.
0.03 2003-02-09
- Giving a language parameter to a constructor method didn't load the
language class.
- Test that all language classes are at least loadable.
- Added Brazilian (not quite a language ;) and Danish, again stolen
from Graham Barr's TimeDate suite.
- Added is_dst method. Requested by Matt Sergeant.
0.02 2003-02-09
- Fixed a bug in calculating day of year in leap years (it was +1 off
starting in February). Reported by Matt Sergeant.
- Subtracting one datetime from another was broken in most cases.
Improved the tests for this quite a bit. Reported by Eric Cholet.
- Made the version number a non-dev-release so it's visible when
CPAN.pm tries to install it as a prereq for something else.
0.01_00 2003-02-04
- The first alpha release. This module draws on Date::ICal for much
of its internals, so it has more history than a normal alpha
release.
( run in 0.969 second using v1.01-cache-2.11-cpan-39bf76dae61 )