Date-Manip
view release on metacpan or search on metacpan
lib/Date/Manip/Changes5to6.pod view on Meta::CPAN
parsed a date from the "Less common formats" section, the default time
was the current time.
So running a program on Jun 5, 2009 at noon that parsed the following
dates gave the following return values:
Jun 12 => Jun 12, 2009 at 00:00:00
next week => Jun 12, 2009 at 12:00:00
This behavior is changed and now relies on the config variable DefaultTime.
If DefaultTime is "curr", the default time for any date which includes no
information about the time is the current time. Otherwise, the default time
is midnight.
=item B<%z format>
In Date::Manip 5.xx, the %z format would give an offset in the form: -0500.
Now it gives it in the form: -05:00:00
=back
=head1 DELTAS
=over 4
=item B<Dropped mixed style delta parsing>
In Date::Manip 5.xx, a parsed delta could be written in the delta style
1:2:3
or in a language-specific expanded form:
1 hour 2 minutes 3 seconds
or in a mixed form:
1 hour 2:3
The mixed form has been dropped since I doubt that it sees much use in
real life, and by dropping the mixed form, the parsing is much
simpler.
=item B<Approximate date/date calculations>
In Date::Manip 5.xx, the approximate delta between the two dates:
Jan 10 1996 noon
Jan 7 1998 noon
was +1:11:4:0:0:0:0 (or 1 year, 11 months, 4 weeks). As of
Date::Manip 6.00, the delta is +2:0:-0:3:0:0:0 (or 2 years minus 3
days). Although this leads to mixed-sign deltas, it is actually
how more people would think about the delta. It has the additional
advantage of being MUCH easier and faster to calculate.
=item B<Approximate relationships in deltas>
When printing parts of deltas in Date::Manip::5.xx, the approximate
relationship of 1 year = 365.25 days was used. This is the correct
value for the Julian calendar, but for the Gregorian calendar, a
better value is 365.2425, and this is used in version 6.00.
=item B<Old style formats>
The formats used in the printf command are slightly different than in the
old Delta_Format command.
The old formats are described in the Date::Manip::DM5 manual, and the
new ones are in the Date::Manip::Delta manual.
The new formats are much more flexible and I encourage you to switch over,
however at this point, the old style formats are officially supported for
the Delta_Format command.
At some point, the old style formats may be deprecated (and removed at
some point beyond that), but for now, they are not.
The old formats are NOT available using the printf method.
=back
=head1 RECURRENCES
=over 4
=item B<The day field meaning changed in a few recurrences>
The value of the day field can refer to several different things
including the day of week number (Monday=1 to Sunday=7), day of month (1-31),
day of year (1-366), etc.
In Date::Manip 5.xx, it could also refer to the nth day of the week
(i.e. 1 being the 1st day of the week, -1 being the last day of the
week). This meaning is no longer used in 6.xx.
For example, the recurrence:
1*2:3:4:0:0:0
referred to the 3rd occurrence of the 4th day of the week in February.
The meaning has been changed to refer to the 3rd occurrence of day 4
(Thursday) in February. This is a much more useful type of recurrence.
As a result of this change, the related recurrence:
1*2:3:-1:0:0:0
is invalid. Negative numbers may be used to refer to the nth day
of the week, but NOT when referring to the day of week numbers.
=item B<Recurrence range now inclusive>
Previously, the list of dates implied by the recurrence were on or
after the start date, but before the end date.
This has been changed so that the dates may be on or before the end
date.
=item B<Dropped support for a couple English recurrences>
( run in 0.810 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )