Upstream changes:
1.51 2019-04-21
- Fix CLDR formatting of 'S' pattern with more than 9 digits of
precision. While we only store nanoseconds in the DateTime object we should
still be able to handle an arbitrary number of digits properly. Fixed by
Slaven Rezić. GH #89.
1.50 2018-08-01
- The %F strftime pattern incorrectly zero-padded numbers less than four
digits. According to POSIX::strftime, this should output the year as-is
without padding. Reported by Andy Lester. GH #83.
Upstream changes:
1.49 2018-05-20
- Updated the ppport.h with the latest version of Devel::PPPort. This fixes a
compilation warning when compiling with 5.27.11. Reported by Jim
Keenan. Fixed GH #81.
1.48 2018-03-26
- The last release would die if Sub::Util was not available, but this should
just be an optional requirement. Fixed by Paul Howarth. Fixes GH #77. PR
#78.
1.47 2018-03-25
- DateTime::Duration->multiply now only allows integer
multipliers. Implemented by Dan Stewart. PR #73.
- Added is_last_day_of_quarter() and is_last_day_of_year()
methods. Implemented by Dan Stewart. PR #72.
- When an exception was thrown while adding a duration the object could be
left in a broken state, with the duration partially applied. Subsequent
addition or subtraction would produce the wrong results. Reported by Pawel
Pabian. GH #74.
Upstream changes:
1.46 2018-02-11
- Fixed the formatting for the CLDR "S" symbol. It could in some cases round
_up_ to 1 instead of truncating a value. For example, the "SSS" symbol would
format 999,999,999 nanoseconds as "1.000". Fixed by Gianni Ceccarelli. PR
#71.
Upstream changes:
1.44 2017-08-20
- Added a stringify() method. This does exactly the same thing as
stringification overloading does. GH #58.
- Added an is_last_day_of_month() method to indicate whether or not an object
falls on the last day of its month. GH #60.
1.43 2017-05-29
- Added a small optimization for boolification overloading. Rather than
relying on a fallback to stringification, we now return true directly, which
is a little faster in cases like "if ($might_be_dt) { ... }".
- The datetime() method now accepts a single argument to use as the separate
between the date and time portion. This defaults to "T".
1.42 2016-12-25
- The DateTime::Duration->add and ->subtract methods now accept
DateTime::Duration objects. This used to work by accident, but this is now
done intentionally (with docs and tests). Reported by Petr Pisar. GitHub
#50.
Upstream changes:
1.41 2016-11-16
- The DateTime->add and ->subtract methods now accept DateTime::Duration
objects. This used to work by accident, but this is now done intentionally
(with docs and tests). Based on PR #45 from Sam Kington.
----------------------------------
1.39 2016-09-17
- Bump minimum required Perl to 5.8.4 from 5.8.1. Looking at CPAN Testers,
this distro hasn't actually passed with earlier Perl versions since
1.35. I'm not explicitly testing with anything earlier than 5.8.8
1.38 2016-09-16
- This release includes changes from past trial releases to switch from
Params::Validate and Params::ValidationCompiler. Relevant release notes from
those trial releases are repeated here for clarity.
- Replaced Params::Validate with Params::ValidationCompiler and Specio. In my
benchmarks this makes constructing a new DateTime object about 14%
faster. However, it slows down module load time by about 100 milliseconds
(1/10 of a second) on my desktop system with a primed cache (so really
measuring compile time, not disk load time).
- When you pass a locale to $dt->set you will now get a warning suggesting you
should use $dt->set_locale instead. The previous trial releases didn't allow
locale to be passed at all, which broke a lot of modules. I've sent PRs, but
for now the parameter should be allowed (but discouraged). Reported by
Slaven Rezić. RT #115420.
1.37 2016-08-14 (TRIAL RELEASE)
- Require the latest Params::ValidationCompiler (0.11).
Upstream changes:
1.35 2016-08-05
- Use namespace::autoclean in all packages which import anything. Without
cleaning the namespace, DateTime ends up with "methods" like try and catch
(from Try::Tiny), which can lead to very confusing bugs. Reported by Mischa
Schwieger. RT #115983.
1.33 2016-06-29
- Fixed the $dt->set docs to say that you cannot pass a locale (even though
you can but you'll get a warning) and added more docs for $dt->set_locale.
- Require DateTime::Locale 1.05.
- Require DateTime::TimeZone 2.00.
1.32 2016-06-28
- This release *does not* include any of the changes in the 1.29-1.30 TRIAL
releases.
- When you pass a locale to $dt->set you will now get a warning suggesting you
should use $dt->set_locale instead. If you have DateTime::Format::Mail
installed you should upgrade to 0.0403 or later, since that module will
trigger this warning.
- Added support for $dt->truncate( to => 'quarter' ). Implemented by Michael
Conrad. GitHub #17.
1.31 2016-06-18 (TRIAL RELEASE)
- When you pass a locale to $dt->set you will now get a warning suggesting you
should use $dt->set_locale instead. The previous trial releases didn't allow
locale to be passed at all, which broke a lot of modules. I've sent PRs, but
for now the parameter should be allowed (but discouraged). Reported by
Slaven Resic. RT #115420.
1.30 2016-06-18 (TRIAL RELEASE)
- Require the latest version of Params::CheckCompiler (0.06). Tests failed
with 0.01.
1.29 2016-06-17 (TRIAL RELEASE)
- Replaced Params::Validate with Params::CheckCompiler and Specio. In my
benchmarks this makes constructing a new DateTime object about 14%
faster. However, it slows down module load time by about 100 milliseconds
(1/10 of a second) on my desktop system with a primed cache (so really
measuring compile time, not disk load time).
1.28 2016-05-21
- Fixed handling of some floating point epochs. Because DateTime treated the
epoch like a string instead of a number, certain epochs with a non-integer
value ended up treated like integers (Perl is weird). Patch by Christian
Hansen. GitHub #15. This also addresses the problem that GitHub #6 brought
up.
1.27 2016-05-13
- Added an environment variable PERL_DATETIME_DEFAULT_TZ to globally set the
default time zone. Using this is very dangerous! Be careful!. Patch by
Ovid. GitHub #14.
1.25 2016-03-06
- DateTime->from_object would die if given a DateTime::Infinite object. Now it
returns another DateTime::Infinite object. Reported by Greg Oschwald. RT
#112712.
1.24 2016-02-29
- The last release partially broke $dt->time. If you passed a value to use as
unit separator, this was ignored. Reported by Sergiy Zuban. RT #112585.
1.23 2016-02-28
- Make all DateTime::Infinite objects return the system's representation of
positive or negative infinity for any method which returns a number of
string representation (year(), month(), ymd(), iso8601(), etc.). Previously
some of these methods could return "Nan", "-Inf--Inf--Inf", and other
confusing outputs. Reported by Greg Oschwald. RT #110341.
1.22 2016-02-21 (TRIAL RELEASE)
- Fixed several issues with the handling of non-integer values passed to
from_epoch().
This method was simply broken for negative values, which would end up being
incremented by a full second, so for example -0.5 became 0.5.
The method did not accept all valid float values. Specifically, it did not
accept values in scientific notation.
Finally, this method now rounds all non-integer values to the nearest
millisecond. This matches the precision we can expect from Perl itself (53
bits) in most cases.
Patch by Christian Hansen. GitHub #11.
1.21 2015-09-30
- Make all tests pass with both the current DateTime::Locale and the upcoming
new version (currently still in trial releases).
Problems found with mismatching existing digests for:
distfiles/asclock-classic-1.0.tar.gz
distfiles/asclock-gtk-2.1.10beta.tar.gz
distfiles/asclock-xlib-2.0.11.tar.gz
distfiles/emiclock-2.0.2.tar.gz
Otherwise, existing SHA1 digests verified and found to be the same on
the machine holding the existing distfiles (morden). All existing
SHA1 digests retained for now as an audit trail.
{perl>=5.16.6,p5-ExtUtils-ParseXS>=3.15}:../../devel/p5-ExtUtils-ParseXS
since pkgsrc enforces the newest perl version anyway, so they
should always pick perl, but sometimes (pkg_add) don't due to the
design of the {,} syntax.
No effective change for the above reason.
Ok joerg
1.20 2015-07-01
- The 1.18 release added the June 30, 2015 leap second to the XS code, but I
forgot to update the corresponding pure Perl implementation in
DateTime::LeapSecond.
1.19 2015-05-31
- If you compared a DateTime object to an undef value, you might have received
a warning pointing to code inside DateTime.pm, instead of in your own
code. Fixed by Jason McIntosh. GH #7.
- The 30future-tz.t could fail if run at certain very specific times. This
should now be much less likely, unless a time zone being tested implements a
DST change at noon (which would even more insane than DST already is by a
huge factor). Reported by Karen Etheridge and diagnosed by Slaven Rezic. RT
#102925.
1.18 2015-01-05
- There will be a new leap second on June 30, 2015.
1.17 2015-01-04
- No code changes from the 1.16 release.
1.16 2015-01-04 (TRIAL RELEASE)
- Test fix for systems where IVs are 4 bytes long.
1.15 2015-01-03 (TRIAL RELEASE)
- Trying this again ... Experimental fix for adding very large numbers of
days. Previously, trying to add more than around 2^28 days could cause
errors if the result ended up in a leap year. This is being released as a
trial release because I'm not sure how this change will behave on a 32-bit
Perl. Reported by KMX. RT #97046.
1.14 2015-01-03
- Accidentally release 1.13 as a non-TRIAL release. Releasing 1.13 minus the
integer change so there's a known-safe stable release on CPAN for people to
install.
1.13 2015-01-03
* This release was deleted from CPAN.
- Experimental fix for adding very large numbers of days. Previously, trying
to add more than around 2^28 days could cause errors if the result ended up
in a leap year. This is being released as a trial release because I'm not
sure how this change will behave on a 32-bit Perl. Reported by KMX. RT
#97046.
- Various small doc chances to address RT #96958, #98733, and #101262.
1.12 2014-08-31
- The last release had the wrong repo info in the metadata.
1.11 2014-08-31
- The latest historical changes in DateTime::TimeZone 1.74 caused some tests
to fail. Reported by Slaven Rezic. RT #98483.
- This release of DateTime.pm now requires the DateTime::TimeZone 1.74.
- Some tests added in 1.09 would fail on a Perl without a 64-bit
gmtime(). Reported by Jerome Eteve. RT #95345.
- A call to ->truncate( to => 'week' ) could fail but leave the object
changed. RT #93347.
- The value of ->jd() is now calculated based on ->mjd() instead of the other
way around. This reduces floating point errors a bit when calculating MJD,
and should have a neglible impact on the accuracy of JD. Reported by Anye
Li. RT #92972. See the ticket for a more detailed description of what this
fixes.
- Attempting to construct a DateTime object with a year >= 5000 and a time
zone other than floating or DST now issues a warning. This warning may go
away once DateTime::TimeZone is made much faster. Inspired by a bug report
from Lloyd Fournier. RT #92655.
Do it for all packages that
* mention perl, or
* have a directory name starting with p5-*, or
* depend on a package starting with p5-
like last time, for 5.18, where this didn't lead to complaints.
Let me know if you have any this time.
Upstream changes:
1.08 2014-03-11
- DateTime now calls DateTime->_core_time() instead of calling Perl's time()
built-in directly. This makes it much easier to override the value of time()
that DateTime sees. This may make it easier to write tests for code that
uses DateTime .
1.07 2014-02-06
- Added a hack to get this module working on Android. RT #92671.
Upstream changes:
1.06 2013-12-31
- DateTime's attempt to generate infinity by calculating 9**9**9 actually got
a number on some platforms, like powerpcspe. Reported by Gregor Hermann. RT
#91696.
1.05 2013-12-22
- Added a new CLDR ZZZZZ specifier, which is like ZZZ but inserts a
colon. Patch by Ricardo Signes.
- Added a new option for the truncate() method to truncate to the
"local_week". This truncates to the locale's notion of the first day of the
week, rather than always truncating to Monday. Patch by Christian Hansen.
1.04 2013-12-07
- Calling set_locale() or set_formatter() on an object with an ambiguous local
time could change the underlying UTC time for that object. Reported by Marta
Cuaresma Saturio. RT #90583.
Upstream changes:
1.03 2013-04-17
- The set_time_zone() method was not returning the object when caalled with a
name that matched the current zone. Reported by Noel Maddy. RT #84699.
1.02 2013-04-15
- When a constructor method like new() or today() was called on an object,
you'd get an error message like 'Can't locate object method
"_normalize_nanoseconds" via package "2013-04-15T00:00:00"'. This has been
fixed to provide a sane error message. Patch by Doug Bell.
- When set_time_zone() is called with a name that matches the current time
zone, DateTime now short circuits and avoids a lot of work. Patch by Mark
Stosberg.
a) refer 'perl' in their Makefile, or
b) have a directory name of p5-*, or
c) have any dependency on any p5-* package
Like last time, where this caused no complaints.
Upstream changes:
1.01 2013-04-01
- Fixed test failures on older Perls.
1.00 2013-03-31
- Bumped the version to 1.00. This is mostly because my prior use of both X.YY
and X.YYYY versions causes trouble for some packaging systems. Plus after 10
years it's probably ready to be called 1.00. Requested by Adam. RT #82800.
- The %j specifier for strftime was not zero-padding 1 and 2 digit
numbers. Fixed by Christian Hansen. RT #84310.
- The truncate method was sloppy about validating its "to" parameter, so you
could pass things like "years" or "month whatever anything goes". The method
would accept the parameter but then not actually truncate the object. RT
#84229.
- Previously, if a call to $dt->set_time_zone() failed it would still change
the time zone of the object, leaving it in a broken state. Reported by Bill
Moseley. RT #83940.
- DateTime::Infinite objects should no longer die when methods that require a
locale are called. Instead, these methods return undef for names and
Inf/-Inf for numbers. This affects methods such as day_name() as well as
CLDR and strftime formats. When a locale-specific format is used (like the
"full" datetime format) it uses the en_US format. Reported by Paul
Boldra. RT #67550.
Upstream changes:
0.78 2012-11-16
- Reverted the change to round nanoseconds up or down in various
situtations. Now we always round down. This avoids the case where rounding
up would require us to then increment the second value (which could then
require us to increment the minute, which could then require us to increment
the hour, which could then ...).
In other words, we don't want to round 2011-12-31T23:59:59.999999 up to
2012-01-01T00:00:00, because that would be insane.
This applies to the return values for ->microsecond, ->millisecond, and the
%N specifier for strftime.
Patch by Martin Hasch. RT #79845.
to 0.7600.
Upstream changes:
0.76 2012-07-01
- The DateTime->subtract method ignored the end_of_month parameter. Patch by
Chris Reinhardt. RT #77844.
0.75 2012-06-11
- The epoch for years 1-999 was broken because Time::Local is "clever". A pox
on all clever APIs, I say! Reported by Christian Hansen. RT #77719.
- Shut up compilation warning from 5.17.x. Reported by Tom Wyant. RT #77490.
0.74 2012-03-22
- Small packaging fix for metacpan's benefit. No need to upgrade.
0.73 2012-03-17
- Change tests to work with Zefram's entirely rebuilt DateTime::TimeZone
distribution, which will replace the current implementation. Patch by
Zefram. RT #75757.
0.72 2012-01-05
- Remove Test::DependentModules from the dep list. This is used by some
author-only tests. Reported by Zefram.
0.71 2012-01-05
- There will be a new leap second on June 30, 2012.
0.70 2011-05-09
- Really fix %N, finally. This was breaking the DateTime::Event::Recurrence
test suite. Patch by Dagfinn Ilmari Mannsåker.
0.69 2011-05-03
- When a DateTime object had nanoseconds == 0, the %N strftime specifier
always returned "0" regardless of the precision requested. Reported by John
Siracusa. RT #67928.
0.68 2011-04-25
- The tests for %N in the last release relied on the vagaries of floating
point math on a 64-bit system. Now the from_epoch() method just uses string
operations to separate the epoch into an integer value and a mantissa. This
avoids floating point insanity. Reported by zefram. RT #67736.
0.67 2011-04-24
- The %N strftime specifier simply truncated nanoseconds, rather than rounding
them. Reported by Michael R. Davis. RT #66744.
- The %U strftime specifier was off by one in years where January 1st was a
Sunday. Patch by Christian Hansen. RT #67631.
- The %W strftime specifier was off by one in years where January 1st was a
Sunday or Monday. Patch by Christian Hansen. RT #67631.
- Some small optimizations from Christian Hansen. The biggest impact is for
calculating week_of_month, week_number, and week_year.
- This distro now requires Perl 5.8.1+ (it implicitly did this anyway now that
Params::Validate is 5.8.1+).