Bug#777175: unblock: libdate-calc-perl/6.3-2, libdate-calc-xs-perl/6.3-2 and libdate-pcalc-perl/6.1-4
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
This is a bit of an unusual unblock request, because it affects three packages.
The reason to have all three in one request is that the patch that is added is
almost exactly the same. the first package's patch has an offset of +2 lines
compared to the patch that is applied to the other two.
Please unblock packages libdate-calc-perl, libdate-calc-xs-perl and
libdate-pcalc-perl.
The patch that is added to them is for fixing test failures during building
(#775628, #775617 and #775632 respectively).
The reason the tests fail is because they depend on the current year. The tests
try to ensure that conversion from a short year without a century to a fully
written year work correctly in different situations. The year that was used is
1964, '64' in the short form. That '64' was interpreted as '1964' up until 31
Dec 2014, but since 1 Jan 2015 '64' is interpreted as '2064', because that year
is closer to 2015 than is 1964. This behaviour is consistent with the modules'
documentation.
The patch that is applied replaces the hardcoded years with the year 45 years
in the past (long and short form). 45 is taken from the distance between 1964
(which was the hardcoded year) and 2009, when the tests were written upstream.
The patch is lenghty, but is all the same all around. Replace '64' with '$y'
and '1964' with '$Y', having set $y and $Y in the top. Obviously the three
packages build fine today.
Attached are:
* the standalone patch that was included as a quilt patch in the three
packages
* debdiffs of the three packages since the version in jessie
unblock libdate-calc-perl/6.3-2
unblock libdate-calc-xs-perl/6.3-2
unblock libdate-pcalc-perl/6.1-4
Thanks for considering,
dam
-- System Information:
Debian Release: 8.0
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Description: fix tests that got broken in 2015
The tests use the 2-digit-year '64' and check that it expands to 1964; which
worked until 2014-12-31. Since 2015-01-01 it expands to 2064, and this
behaviour is consistent with the module documentation.
.
So the patch changes the hardcoded '1964' and '64' with the year 45 in the
past from now, full and century-less version.
.
45 is how far in the past 1964 was in 2009, when the tests were written.
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101232
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=101232
Bug-Debian: https://bugs.debian.org/775617
Author: Damyan Ivanov <dmn@debian.org>, Gregor Herrmann <gregoa@debian.org>
--- a/t/f016.t
+++ b/t/f016.t
@@ -11,55 +11,58 @@ use Date::Calc qw( Decode_Date_EU Decode
# ($year,$mm,$dd) = Decode_Date_US($buffer);
# ======================================================================
+my $Y = 1900 + (localtime)[5] - 45; # expected year (e.g. 1965 in 2009)
+my $y = sprintf("%02d", $Y % 100); # short year (e.g. 65)
+
print "1..25\n";
$n = 1;
-if ((($year,$mm,$dd) = Decode_Date_EU("3.1.64")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU("3.1.$y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU("3 1 64")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU("3 1 $y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU("03.01.64")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU("03.01.$y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU("03/01/64")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU("03/01/$y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU("3. Ene 1964",4)) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU("3. Ene $Y",4)) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU("Geburtstag: 3. Januar '64 in Backnang/Württemberg",3)) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU("Geburtstag: 3. Januar '$y in Backnang/Württemberg",3)) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU("03-Jan-64")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU("03-Jan-$y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU("3.Jan1964",6)) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU("3.Jan$Y",6)) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU("3Jan64",0)) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU("3Jan$y",0)) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU("030164")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU("0301$y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU("3ja64")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU("3ja$y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU("3164")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU("31$y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
@@ -71,16 +74,16 @@ unless (($year,$mm,$dd) = Decode_Date_EU
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US("1 3 64")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US("1 3 $y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US("01/03/64")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US("01/03/$y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 '64")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 '$y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 1964")) &&
@@ -95,16 +98,16 @@ if ((($year,$mm,$dd) = Decode_Date_US("J
($year==1964)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US("Jan364")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US("Jan3$y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US("ja364")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US("ja3$y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US("1364")) &&
-($year==1964)&&($mm==1)&&($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US("13$y")) &&
+($year==$Y)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
--- a/t/f027.t
+++ b/t/f027.t
@@ -10,6 +10,9 @@ use Date::Calc qw( Decode_Date_US2 Langu
# ($year,$mm,$dd) = Decode_Date_US2($date);
# ======================================================================
+my $Y = 1900 + (localtime)[5] - 50; # expected year (e.g. 1965)
+my $y = sprintf('%02d', $Y % 100); # short year (e.g. 65)
+
print "1..46\n";
$n = 1;
@@ -40,83 +43,83 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_1364_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_13${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_01364_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_013${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_001364_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_0013${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_10364_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_103${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_010364_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_0103${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_0010364_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_00103${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_110364_")) &&
-($year==1964) && ($mm==11) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_1103${y}_")) &&
+($year==$Y) && ($mm==11) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_0110364_")) &&
-($year==1964) && ($mm==11) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_01103${y}_")) &&
+($year==$Y) && ($mm==11) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_00110364_")) &&
-($year==1964) && ($mm==11) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_001103${y}_")) &&
+($year==$Y) && ($mm==11) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_1031964_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_10319${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_01031964_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_010319${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_001031964_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_0010319${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_11031964_")) &&
-($year==1964) && ($mm==11) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_110319${y}_")) &&
+($year==$Y) && ($mm==11) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_011031964_")) &&
-($year==1964) && ($mm==11) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_0110319${y}_")) &&
+($year==$Y) && ($mm==11) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_0011031964_")) &&
-($year==1964) && ($mm==11) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_00110319${y}_")) &&
+($year==$Y) && ($mm==11) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_1_3_64_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_1_3_${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
@@ -125,27 +128,27 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_jan_3_64_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_jan_3_${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan_3_64_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_Jan_3_${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_jAN_3_64_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_jAN_3_${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_January_3_64_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_January_3_${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-unless (($year,$mm,$dd) = Decode_Date_US2("_j_3_64_"))
+unless (($year,$mm,$dd) = Decode_Date_US2("_j_3_${y}_"))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
@@ -154,33 +157,33 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan364_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_Jan3${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan0364_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_Jan03${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan00364_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_Jan003${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan2264_")) &&
-($year==1964) && ($mm==1) && ($dd==22))
+if ((($year,$mm,$dd) = Decode_Date_US2("_Jan22${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==22))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan02264_",0)) &&
-($year==1964) && ($mm==1) && ($dd==22))
+if ((($year,$mm,$dd) = Decode_Date_US2("_Jan022${y}_",0)) &&
+($year==$Y) && ($mm==1) && ($dd==22))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan002264_",'')) &&
-($year==1964) && ($mm==1) && ($dd==22))
+if ((($year,$mm,$dd) = Decode_Date_US2("_Jan0022${y}_",'')) &&
+($year==$Y) && ($mm==1) && ($dd==22))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
@@ -214,7 +217,7 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-unless (($year,$mm,$dd) = Decode_Date_US2("_ja3364_"))
+unless (($year,$mm,$dd) = Decode_Date_US2("_ja33${y}_"))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
@@ -222,13 +225,13 @@ unless (($year,$mm,$dd) = Decode_Date_US
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("x000001x000003x000064x")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("x000001x000003x0000${y}x")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_US2("_ja_000003x000064x")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_US2("_ja_000003x0000${y}x")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
--- a/t/f028.t
+++ b/t/f028.t
@@ -9,6 +9,8 @@ use Date::Calc qw( Decode_Date_EU2 Langu
# ======================================================================
# ($year,$mm,$dd) = Decode_Date_EU2($date);
# ======================================================================
+my $Y = 1900 + (localtime)[5] - 50; # wanted year (e.g. 1965)
+my $y = sprintf('%02d', $Y % 100); # short year (e.g. 65)
print "1..46\n";
@@ -40,48 +42,48 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_3164_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_31${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_03164_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_031${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_003164_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_0031${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_30164_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_301${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_030164_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_0301${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_0030164_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_00301${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_110364_")) &&
-($year==1964) && ($mm==3) && ($dd==11))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_1103${y}_")) &&
+($year==$Y) && ($mm==3) && ($dd==11))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_0110364_")) &&
-($year==1964) && ($mm==3) && ($dd==11))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_01103${y}_")) &&
+($year==$Y) && ($mm==3) && ($dd==11))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_00110364_")) &&
-($year==1964) && ($mm==3) && ($dd==11))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_001103${y}_")) &&
+($year==$Y) && ($mm==3) && ($dd==11))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
@@ -115,8 +117,8 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_1_64_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_3_1_${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
@@ -125,23 +127,23 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jan_64_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jan_${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_Jan_64_",0)) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_3_Jan_${y}_",0)) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jAN_64_",1)) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jAN_${y}_",1)) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_3-JAN-64_",2)) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_3-JAN-${y}_",2)) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
@@ -155,8 +157,8 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_000003-Jan-000064_",undef)) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_000003-Jan-0000${y}_",undef)) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
@@ -165,32 +167,32 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_ja_64_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_3_ja_${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-unless (($year,$mm,$dd) = Decode_Date_EU2("_3_j_64_"))
+unless (($year,$mm,$dd) = Decode_Date_EU2("_3_j_${y}_"))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_3ja64_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_3ja${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_03ja64_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_03ja${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_003ja64_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_003ja${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("_000003ja000064_")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("_000003ja0000${y}_")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
@@ -214,7 +216,7 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-unless (($year,$mm,$dd) = Decode_Date_EU2("_33ja64_"))
+unless (($year,$mm,$dd) = Decode_Date_EU2("_33ja${y}_"))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
@@ -222,13 +224,13 @@ unless (($year,$mm,$dd) = Decode_Date_EU
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("x000003x000001x000064x")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("x000003x000001x0000${y}x")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
-if ((($year,$mm,$dd) = Decode_Date_EU2("x000003_ja_000064x")) &&
-($year==1964) && ($mm==1) && ($dd==3))
+if ((($year,$mm,$dd) = Decode_Date_EU2("x000003_ja_0000${y}x")) &&
+($year==$Y) && ($mm==1) && ($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
DEBIAN DIFF
--- libdate-calc-perl-6.3/debian/changelog 2011-09-13 18:18:53.000000000 +0300
+++ libdate-calc-perl-6.3/debian/changelog 2015-02-05 23:51:27.000000000 +0200
@@ -1,3 +1,13 @@
+libdate-calc-perl (6.3-2) unstable; urgency=medium
+
+ * add a patch to fix tests that are broken since 1 Jan 2015
+ the tests were hardcoding years like 64 that was interpreted as '1964'
+ until 31 Dec 2014 and now are interpreted as 2064, causing test failures.
+ The patch chooses the year dynamically to get consistent results
+ regardless of the current year. (Closes: #775628)
+
+ -- Damyan Ivanov <dmn@debian.org> Thu, 05 Feb 2015 21:32:10 +0000
+
libdate-calc-perl (6.3-1) unstable; urgency=low
[ Jonathan Yu ]
--- libdate-calc-perl-6.3/debian/patches/century-tests.patch 1970-01-01 02:00:00.000000000 +0200
+++ libdate-calc-perl-6.3/debian/patches/century-tests.patch 2015-02-05 23:31:11.000000000 +0200
@@ -0,0 +1,587 @@
+Description: fix tests that got broken in 2015
+ The tests use the 2-digit-year '64' and check that it expands to 1964; which
+ worked until 2014-12-31. Since 2015-01-01 it expands to 2064, and this
+ behaviour is consistent with the module documentation.
+ .
+ So the patch changes the hardcoded '1964' and '64' with the year 45 in the
+ past from now, full and century-less version.
+ .
+ 45 is how far in the past 1964 was in 2009, when the tests were written.
+
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101232
+Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=101232
+Bug-Debian: https://bugs.debian.org/775628
+Author: Damyan Ivanov <dmn@debian.org>, Gregor Herrmann <gregoa@debian.org>
+
+--- a/t/f016.t
++++ b/t/f016.t
+@@ -13,55 +13,58 @@ use Date::Calc qw( Decode_Date_EU Decode
+ # ($year,$mm,$dd) = Decode_Date_US($buffer);
+ # ======================================================================
+
++my $Y = 1900 + (localtime)[5] - 45; # expected year (e.g. 1965 in 2009)
++my $y = sprintf("%02d", $Y % 100); # short year (e.g. 65)
++
+ print "1..25\n";
+
+ $n = 1;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3.1.64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3.1.$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3 1 64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3 1 $y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("03.01.64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("03.01.$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("03/01/64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("03/01/$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3. Ene 1964",4)) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3. Ene $Y",4)) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("Geburtstag: 3. Januar '64 in Backnang/Württemberg",3)) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("Geburtstag: 3. Januar '$y in Backnang/Württemberg",3)) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("03-Jan-64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("03-Jan-$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3.Jan1964",6)) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3.Jan$Y",6)) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3Jan64",0)) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3Jan$y",0)) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("030164")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("0301$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3ja64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3ja$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3164")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("31$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -73,16 +76,16 @@ unless (($year,$mm,$dd) = Decode_Date_EU
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US("1 3 64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("1 3 $y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("01/03/64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("01/03/$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 '64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 '$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+ if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 1964")) &&
+@@ -97,16 +100,16 @@ if ((($year,$mm,$dd) = Decode_Date_US("J
+ ($year==1964)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("Jan364")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("Jan3$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("ja364")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("ja3$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("1364")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("13$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+--- a/t/f027.t
++++ b/t/f027.t
+@@ -12,6 +12,9 @@ use Date::Calc qw( Decode_Date_US2 Langu
+ # ($year,$mm,$dd) = Decode_Date_US2($date);
+ # ======================================================================
+
++my $Y = 1900 + (localtime)[5] - 50; # expected year (e.g. 1965)
++my $y = sprintf('%02d', $Y % 100); # short year (e.g. 65)
++
+ print "1..46\n";
+
+ $n = 1;
+@@ -42,83 +45,83 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_1364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_13${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_01364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_013${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_001364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_0013${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_10364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_103${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_010364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_0103${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_0010364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_00103${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_110364_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_1103${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_0110364_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_01103${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_00110364_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_001103${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_1031964_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_10319${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_01031964_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_010319${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_001031964_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_0010319${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_11031964_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_110319${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_011031964_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_0110319${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_0011031964_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_00110319${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_1_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_1_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -127,27 +130,27 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_jan_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_jan_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_jAN_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_jAN_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_January_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_January_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-unless (($year,$mm,$dd) = Decode_Date_US2("_j_3_64_"))
++unless (($year,$mm,$dd) = Decode_Date_US2("_j_3_${y}_"))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -156,33 +159,33 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan3${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan0364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan03${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan00364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan003${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan2264_")) &&
+-($year==1964) && ($mm==1) && ($dd==22))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan22${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==22))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan02264_",0)) &&
+-($year==1964) && ($mm==1) && ($dd==22))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan022${y}_",0)) &&
++($year==$Y) && ($mm==1) && ($dd==22))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan002264_",'')) &&
+-($year==1964) && ($mm==1) && ($dd==22))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan0022${y}_",'')) &&
++($year==$Y) && ($mm==1) && ($dd==22))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -216,7 +219,7 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-unless (($year,$mm,$dd) = Decode_Date_US2("_ja3364_"))
++unless (($year,$mm,$dd) = Decode_Date_US2("_ja33${y}_"))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -224,13 +227,13 @@ unless (($year,$mm,$dd) = Decode_Date_US
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("x000001x000003x000064x")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("x000001x000003x0000${y}x")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_ja_000003x000064x")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_ja_000003x0000${y}x")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+--- a/t/f028.t
++++ b/t/f028.t
+@@ -11,6 +11,8 @@ use Date::Calc qw( Decode_Date_EU2 Langu
+ # ======================================================================
+ # ($year,$mm,$dd) = Decode_Date_EU2($date);
+ # ======================================================================
++my $Y = 1900 + (localtime)[5] - 50; # wanted year (e.g. 1965)
++my $y = sprintf('%02d', $Y % 100); # short year (e.g. 65)
+
+ print "1..46\n";
+
+@@ -42,48 +44,48 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_31${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_03164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_031${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_003164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_0031${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_30164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_301${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_030164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_0301${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_0030164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_00301${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_110364_")) &&
+-($year==1964) && ($mm==3) && ($dd==11))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_1103${y}_")) &&
++($year==$Y) && ($mm==3) && ($dd==11))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_0110364_")) &&
+-($year==1964) && ($mm==3) && ($dd==11))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_01103${y}_")) &&
++($year==$Y) && ($mm==3) && ($dd==11))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_00110364_")) &&
+-($year==1964) && ($mm==3) && ($dd==11))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_001103${y}_")) &&
++($year==$Y) && ($mm==3) && ($dd==11))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -117,8 +119,8 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_1_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_1_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -127,23 +129,23 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jan_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jan_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_Jan_64_",0)) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_Jan_${y}_",0)) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jAN_64_",1)) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jAN_${y}_",1)) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3-JAN-64_",2)) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3-JAN-${y}_",2)) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -157,8 +159,8 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_000003-Jan-000064_",undef)) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_000003-Jan-0000${y}_",undef)) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -167,32 +169,32 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_ja_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_ja_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-unless (($year,$mm,$dd) = Decode_Date_EU2("_3_j_64_"))
++unless (($year,$mm,$dd) = Decode_Date_EU2("_3_j_${y}_"))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3ja64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3ja${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_03ja64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_03ja${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_003ja64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_003ja${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_000003ja000064_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_000003ja0000${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -216,7 +218,7 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-unless (($year,$mm,$dd) = Decode_Date_EU2("_33ja64_"))
++unless (($year,$mm,$dd) = Decode_Date_EU2("_33ja${y}_"))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -224,13 +226,13 @@ unless (($year,$mm,$dd) = Decode_Date_EU
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("x000003x000001x000064x")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("x000003x000001x0000${y}x")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("x000003_ja_000064x")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("x000003_ja_0000${y}x")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
--- libdate-calc-perl-6.3/debian/patches/series 2011-09-13 18:18:53.000000000 +0300
+++ libdate-calc-perl-6.3/debian/patches/series 2015-02-05 22:47:42.000000000 +0200
@@ -1 +1,2 @@
spelling.patch
+century-tests.patch
DEBIAN DIFF
--- libdate-calc-xs-perl-6.3/debian/changelog 2012-06-03 16:41:44.000000000 +0300
+++ libdate-calc-xs-perl-6.3/debian/changelog 2015-02-05 23:42:05.000000000 +0200
@@ -1,3 +1,15 @@
+libdate-calc-xs-perl (6.3-2) unstable; urgency=medium
+
+ * Team upload
+
+ * add a patch to fix tests that are broken since 1 Jan 2015
+ the tests were hardcoding years like 64 that was interpreted as '1964'
+ until 31 Dec 2014 and now are interpreted as 2064, causing test failures.
+ The patch chooses the year dynamically to get consistent results
+ regardless of the current year. (Closes: #775617)
+
+ -- Damyan Ivanov <dmn@debian.org> Thu, 05 Feb 2015 21:41:19 +0000
+
libdate-calc-xs-perl (6.3-1) unstable; urgency=low
[ Florian Schlichting ]
--- libdate-calc-xs-perl-6.3/debian/patches/century-tests.patch 1970-01-01 02:00:00.000000000 +0200
+++ libdate-calc-xs-perl-6.3/debian/patches/century-tests.patch 2015-02-05 23:35:29.000000000 +0200
@@ -0,0 +1,587 @@
+Description: fix tests that got broken in 2015
+ The tests use the 2-digit-year '64' and check that it expands to 1964; which
+ worked until 2014-12-31. Since 2015-01-01 it expands to 2064, and this
+ behaviour is consistent with the module documentation.
+ .
+ So the patch changes the hardcoded '1964' and '64' with the year 45 in the
+ past from now, full and century-less version.
+ .
+ 45 is how far in the past 1964 was in 2009, when the tests were written.
+
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101232
+Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=101232
+Bug-Debian: https://bugs.debian.org/775617
+Author: Damyan Ivanov <dmn@debian.org>, Gregor Herrmann <gregoa@debian.org>
+
+--- a/t/f016.t
++++ b/t/f016.t
+@@ -11,55 +11,58 @@ use Date::Calc qw( Decode_Date_EU Decode
+ # ($year,$mm,$dd) = Decode_Date_US($buffer);
+ # ======================================================================
+
++my $Y = 1900 + (localtime)[5] - 45; # expected year (e.g. 1965 in 2009)
++my $y = sprintf("%02d", $Y % 100); # short year (e.g. 65)
++
+ print "1..25\n";
+
+ $n = 1;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3.1.64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3.1.$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3 1 64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3 1 $y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("03.01.64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("03.01.$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("03/01/64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("03/01/$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3. Ene 1964",4)) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3. Ene $Y",4)) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("Geburtstag: 3. Januar '64 in Backnang/Württemberg",3)) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("Geburtstag: 3. Januar '$y in Backnang/Württemberg",3)) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("03-Jan-64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("03-Jan-$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3.Jan1964",6)) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3.Jan$Y",6)) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3Jan64",0)) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3Jan$y",0)) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("030164")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("0301$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3ja64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3ja$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3164")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("31$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -71,16 +74,16 @@ unless (($year,$mm,$dd) = Decode_Date_EU
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US("1 3 64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("1 3 $y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("01/03/64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("01/03/$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 '64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 '$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+ if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 1964")) &&
+@@ -95,16 +98,16 @@ if ((($year,$mm,$dd) = Decode_Date_US("J
+ ($year==1964)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("Jan364")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("Jan3$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("ja364")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("ja3$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("1364")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("13$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+--- a/t/f027.t
++++ b/t/f027.t
+@@ -10,6 +10,9 @@ use Date::Calc qw( Decode_Date_US2 Langu
+ # ($year,$mm,$dd) = Decode_Date_US2($date);
+ # ======================================================================
+
++my $Y = 1900 + (localtime)[5] - 50; # expected year (e.g. 1965)
++my $y = sprintf('%02d', $Y % 100); # short year (e.g. 65)
++
+ print "1..46\n";
+
+ $n = 1;
+@@ -40,83 +43,83 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_1364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_13${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_01364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_013${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_001364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_0013${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_10364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_103${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_010364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_0103${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_0010364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_00103${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_110364_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_1103${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_0110364_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_01103${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_00110364_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_001103${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_1031964_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_10319${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_01031964_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_010319${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_001031964_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_0010319${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_11031964_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_110319${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_011031964_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_0110319${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_0011031964_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_00110319${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_1_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_1_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -125,27 +128,27 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_jan_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_jan_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_jAN_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_jAN_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_January_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_January_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-unless (($year,$mm,$dd) = Decode_Date_US2("_j_3_64_"))
++unless (($year,$mm,$dd) = Decode_Date_US2("_j_3_${y}_"))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -154,33 +157,33 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan3${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan0364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan03${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan00364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan003${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan2264_")) &&
+-($year==1964) && ($mm==1) && ($dd==22))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan22${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==22))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan02264_",0)) &&
+-($year==1964) && ($mm==1) && ($dd==22))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan022${y}_",0)) &&
++($year==$Y) && ($mm==1) && ($dd==22))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan002264_",'')) &&
+-($year==1964) && ($mm==1) && ($dd==22))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan0022${y}_",'')) &&
++($year==$Y) && ($mm==1) && ($dd==22))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -214,7 +217,7 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-unless (($year,$mm,$dd) = Decode_Date_US2("_ja3364_"))
++unless (($year,$mm,$dd) = Decode_Date_US2("_ja33${y}_"))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -222,13 +225,13 @@ unless (($year,$mm,$dd) = Decode_Date_US
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("x000001x000003x000064x")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("x000001x000003x0000${y}x")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_ja_000003x000064x")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_ja_000003x0000${y}x")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+--- a/t/f028.t
++++ b/t/f028.t
+@@ -9,6 +9,8 @@ use Date::Calc qw( Decode_Date_EU2 Langu
+ # ======================================================================
+ # ($year,$mm,$dd) = Decode_Date_EU2($date);
+ # ======================================================================
++my $Y = 1900 + (localtime)[5] - 50; # wanted year (e.g. 1965)
++my $y = sprintf('%02d', $Y % 100); # short year (e.g. 65)
+
+ print "1..46\n";
+
+@@ -40,48 +42,48 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_31${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_03164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_031${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_003164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_0031${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_30164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_301${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_030164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_0301${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_0030164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_00301${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_110364_")) &&
+-($year==1964) && ($mm==3) && ($dd==11))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_1103${y}_")) &&
++($year==$Y) && ($mm==3) && ($dd==11))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_0110364_")) &&
+-($year==1964) && ($mm==3) && ($dd==11))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_01103${y}_")) &&
++($year==$Y) && ($mm==3) && ($dd==11))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_00110364_")) &&
+-($year==1964) && ($mm==3) && ($dd==11))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_001103${y}_")) &&
++($year==$Y) && ($mm==3) && ($dd==11))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -115,8 +117,8 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_1_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_1_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -125,23 +127,23 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jan_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jan_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_Jan_64_",0)) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_Jan_${y}_",0)) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jAN_64_",1)) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jAN_${y}_",1)) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3-JAN-64_",2)) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3-JAN-${y}_",2)) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -155,8 +157,8 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_000003-Jan-000064_",undef)) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_000003-Jan-0000${y}_",undef)) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -165,32 +167,32 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_ja_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_ja_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-unless (($year,$mm,$dd) = Decode_Date_EU2("_3_j_64_"))
++unless (($year,$mm,$dd) = Decode_Date_EU2("_3_j_${y}_"))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3ja64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3ja${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_03ja64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_03ja${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_003ja64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_003ja${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_000003ja000064_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_000003ja0000${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -214,7 +216,7 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-unless (($year,$mm,$dd) = Decode_Date_EU2("_33ja64_"))
++unless (($year,$mm,$dd) = Decode_Date_EU2("_33ja${y}_"))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -222,13 +224,13 @@ unless (($year,$mm,$dd) = Decode_Date_EU
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("x000003x000001x000064x")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("x000003x000001x0000${y}x")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("x000003_ja_000064x")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("x000003_ja_0000${y}x")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
--- libdate-calc-xs-perl-6.3/debian/patches/series 2012-06-03 16:41:44.000000000 +0300
+++ libdate-calc-xs-perl-6.3/debian/patches/series 2015-02-05 23:34:47.000000000 +0200
@@ -1 +1,2 @@
SvPV.patch
+century-tests.patch
DEBIAN DIFF
--- libdate-pcalc-perl-6.1/debian/changelog 2014-04-13 17:48:47.000000000 +0300
+++ libdate-pcalc-perl-6.1/debian/changelog 2015-02-05 23:49:13.000000000 +0200
@@ -1,3 +1,15 @@
+libdate-pcalc-perl (6.1-4) unstable; urgency=medium
+
+ * Team upload
+
+ * add a patch to fix tests that are broken since 1 Jan 2015
+ the tests were hardcoding years like 64 that was interpreted as '1964'
+ until 31 Dec 2014 and now are interpreted as 2064, causing test failures.
+ The patch chooses the year dynamically to get consistent results
+ regardless of the current year. (Closes: #775632)
+
+ -- Damyan Ivanov <dmn@debian.org> Thu, 05 Feb 2015 21:49:05 +0000
+
libdate-pcalc-perl (6.1-3) unstable; urgency=low
* Team upload
--- libdate-pcalc-perl-6.1/debian/patches/century-tests.patch 1970-01-01 02:00:00.000000000 +0200
+++ libdate-pcalc-perl-6.1/debian/patches/century-tests.patch 2015-02-05 23:45:47.000000000 +0200
@@ -0,0 +1,587 @@
+Description: fix tests that got broken in 2015
+ The tests use the 2-digit-year '64' and check that it expands to 1964; which
+ worked until 2014-12-31. Since 2015-01-01 it expands to 2064, and this
+ behaviour is consistent with the module documentation.
+ .
+ So the patch changes the hardcoded '1964' and '64' with the year 45 in the
+ past from now, full and century-less version.
+ .
+ 45 is how far in the past 1964 was in 2009, when the tests were written.
+
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101232
+Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=101232
+Bug-Debian: https://bugs.debian.org/775632
+Author: Damyan Ivanov <dmn@debian.org>, Gregor Herrmann <gregoa@debian.org>
+
+--- a/t/f016.t
++++ b/t/f016.t
+@@ -11,55 +11,58 @@ use Date::Calc qw( Decode_Date_EU Decode
+ # ($year,$mm,$dd) = Decode_Date_US($buffer);
+ # ======================================================================
+
++my $Y = 1900 + (localtime)[5] - 45; # expected year (e.g. 1965 in 2009)
++my $y = sprintf("%02d", $Y % 100); # short year (e.g. 65)
++
+ print "1..25\n";
+
+ $n = 1;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3.1.64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3.1.$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3 1 64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3 1 $y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("03.01.64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("03.01.$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("03/01/64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("03/01/$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3. Ene 1964",4)) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3. Ene $Y",4)) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("Geburtstag: 3. Januar '64 in Backnang/Württemberg",3)) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("Geburtstag: 3. Januar '$y in Backnang/Württemberg",3)) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("03-Jan-64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("03-Jan-$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3.Jan1964",6)) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3.Jan$Y",6)) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3Jan64",0)) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3Jan$y",0)) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("030164")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("0301$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3ja64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("3ja$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_EU("3164")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU("31$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -71,16 +74,16 @@ unless (($year,$mm,$dd) = Decode_Date_EU
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US("1 3 64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("1 3 $y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("01/03/64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("01/03/$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 '64")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 '$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+ if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 1964")) &&
+@@ -95,16 +98,16 @@ if ((($year,$mm,$dd) = Decode_Date_US("J
+ ($year==1964)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("Jan364")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("Jan3$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("ja364")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("ja3$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+-if ((($year,$mm,$dd) = Decode_Date_US("1364")) &&
+-($year==1964)&&($mm==1)&&($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US("13$y")) &&
++($year==$Y)&&($mm==1)&&($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+--- a/t/f027.t
++++ b/t/f027.t
+@@ -10,6 +10,9 @@ use Date::Calc qw( Decode_Date_US2 Langu
+ # ($year,$mm,$dd) = Decode_Date_US2($date);
+ # ======================================================================
+
++my $Y = 1900 + (localtime)[5] - 50; # expected year (e.g. 1965)
++my $y = sprintf('%02d', $Y % 100); # short year (e.g. 65)
++
+ print "1..46\n";
+
+ $n = 1;
+@@ -40,83 +43,83 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_1364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_13${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_01364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_013${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_001364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_0013${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_10364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_103${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_010364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_0103${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_0010364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_00103${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_110364_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_1103${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_0110364_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_01103${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_00110364_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_001103${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_1031964_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_10319${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_01031964_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_010319${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_001031964_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_0010319${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_11031964_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_110319${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_011031964_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_0110319${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_0011031964_")) &&
+-($year==1964) && ($mm==11) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_00110319${y}_")) &&
++($year==$Y) && ($mm==11) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_1_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_1_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -125,27 +128,27 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_jan_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_jan_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_jAN_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_jAN_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_January_3_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_January_3_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-unless (($year,$mm,$dd) = Decode_Date_US2("_j_3_64_"))
++unless (($year,$mm,$dd) = Decode_Date_US2("_j_3_${y}_"))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -154,33 +157,33 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan3${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan0364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan03${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan00364_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan003${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan2264_")) &&
+-($year==1964) && ($mm==1) && ($dd==22))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan22${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==22))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan02264_",0)) &&
+-($year==1964) && ($mm==1) && ($dd==22))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan022${y}_",0)) &&
++($year==$Y) && ($mm==1) && ($dd==22))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_Jan002264_",'')) &&
+-($year==1964) && ($mm==1) && ($dd==22))
++if ((($year,$mm,$dd) = Decode_Date_US2("_Jan0022${y}_",'')) &&
++($year==$Y) && ($mm==1) && ($dd==22))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -214,7 +217,7 @@ if ((($year,$mm,$dd) = Decode_Date_US2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-unless (($year,$mm,$dd) = Decode_Date_US2("_ja3364_"))
++unless (($year,$mm,$dd) = Decode_Date_US2("_ja33${y}_"))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -222,13 +225,13 @@ unless (($year,$mm,$dd) = Decode_Date_US
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("x000001x000003x000064x")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("x000001x000003x0000${y}x")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_US2("_ja_000003x000064x")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_US2("_ja_000003x0000${y}x")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+--- a/t/f028.t
++++ b/t/f028.t
+@@ -9,6 +9,8 @@ use Date::Calc qw( Decode_Date_EU2 Langu
+ # ======================================================================
+ # ($year,$mm,$dd) = Decode_Date_EU2($date);
+ # ======================================================================
++my $Y = 1900 + (localtime)[5] - 50; # wanted year (e.g. 1965)
++my $y = sprintf('%02d', $Y % 100); # short year (e.g. 65)
+
+ print "1..46\n";
+
+@@ -40,48 +42,48 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_31${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_03164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_031${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_003164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_0031${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_30164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_301${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_030164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_0301${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_0030164_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_00301${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_110364_")) &&
+-($year==1964) && ($mm==3) && ($dd==11))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_1103${y}_")) &&
++($year==$Y) && ($mm==3) && ($dd==11))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_0110364_")) &&
+-($year==1964) && ($mm==3) && ($dd==11))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_01103${y}_")) &&
++($year==$Y) && ($mm==3) && ($dd==11))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_00110364_")) &&
+-($year==1964) && ($mm==3) && ($dd==11))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_001103${y}_")) &&
++($year==$Y) && ($mm==3) && ($dd==11))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -115,8 +117,8 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_1_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_1_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -125,23 +127,23 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jan_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jan_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_Jan_64_",0)) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_Jan_${y}_",0)) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jAN_64_",1)) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jAN_${y}_",1)) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3-JAN-64_",2)) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3-JAN-${y}_",2)) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -155,8 +157,8 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_000003-Jan-000064_",undef)) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_000003-Jan-0000${y}_",undef)) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -165,32 +167,32 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3_ja_64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3_ja_${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-unless (($year,$mm,$dd) = Decode_Date_EU2("_3_j_64_"))
++unless (($year,$mm,$dd) = Decode_Date_EU2("_3_j_${y}_"))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_3ja64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_3ja${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_03ja64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_03ja${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_003ja64_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_003ja${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("_000003ja000064_")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("_000003ja0000${y}_")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -214,7 +216,7 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-unless (($year,$mm,$dd) = Decode_Date_EU2("_33ja64_"))
++unless (($year,$mm,$dd) = Decode_Date_EU2("_33ja${y}_"))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+@@ -222,13 +224,13 @@ unless (($year,$mm,$dd) = Decode_Date_EU
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("x000003x000001x000064x")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("x000003x000001x0000${y}x")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
+-if ((($year,$mm,$dd) = Decode_Date_EU2("x000003_ja_000064x")) &&
+-($year==1964) && ($mm==1) && ($dd==3))
++if ((($year,$mm,$dd) = Decode_Date_EU2("x000003_ja_0000${y}x")) &&
++($year==$Y) && ($mm==1) && ($dd==3))
+ {print "ok $n\n";} else {print "not ok $n\n";}
+ $n++;
+
--- libdate-pcalc-perl-6.1/debian/patches/series 2014-04-13 17:48:47.000000000 +0300
+++ libdate-pcalc-perl-6.1/debian/patches/series 2015-02-05 23:44:24.000000000 +0200
@@ -1,3 +1,4 @@
pod_typos_error.patch
10-examples.diff
15-fix-5.16-ftbfs.diff
+century-tests.patch
Reply to: