DateTime
view release on metacpan or search on metacpan
- Added month_length(), quarter_length() and year_length()
methods. Implemented by Dan Stewart. PR #70.
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 separator
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.
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.40 2016-11-12
- Switched from RT to the GitHub issue tracker.
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.
- Removed the long-deprecated DateTime->DefaultLanguage method. Use
DefaultLocale instead.
- Removed the long-deprecated "language" constructor parameter. Use "locale"
instead.
1.37 2016-08-14 (TRIAL RELEASE)
- Require the latest Params::ValidationCompiler (0.11).
1.36 2016-08-06
- Require namespace::autoclean 0.19.
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.34 2016-07-06
- Added the leap second coming on December 31, 2016.
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 ReziÄ. RT #115420.
1.30 2016-06-18 (TRIAL RELEASE)
- Require the latest version of Params::ValidationCompiler (0.06). Tests failed
with 0.01.
1.29 2016-06-17 (TRIAL RELEASE)
- 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).
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. Addresses RT #96452, reported by Slaven ReziÄ.
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.26 2016-03-21
- Switched from Module::Build to ExtUtils::MakeMaker. Implementation by Karen
Etheridge. GitHub #13.
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
( run in 0.510 second using v1.01-cache-2.11-cpan-e1769b4cff6 )