Package: libdate-manip-perl
Version: 5.44-2
Severity: minor
Tags: patch

UnixDate("Today","%m") returns null; UnixDate("today","%m") works. This was 
not how Date::Manip worked in the past (or in Sarge). It created some very
subtle breakage for some of my scripts.

I would suggest making the "today" matching case insensitive. A simple patch
is attached.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-rc4-joehill
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libdate-manip-perl depends on:
ii  perl                          5.8.8-4    Larry Wall's Practical Extraction 

libdate-manip-perl recommends no packages.

-- no debconf information
--- ../old/Manip.pm     2006-06-18 14:13:15.000000000 -0400
+++ ./Manip.pm  2006-06-18 14:14:56.000000000 -0400
@@ -1258,7 +1258,7 @@
         $num=1;
         $tmp="+";
       } elsif ( (/^$now\s*$wkabb$/i  &&  ($tmp="Now"))  ||
-                (/^$today\s*$wkabb$/ &&  ($tmp="Today")) ) {
+                (/^$today\s*$wkabb$/i &&  ($tmp="Today")) ) {
         # now week     (British date: 1 week from now)
         # today week   (British date: 1 week from today)
         &Date_Init()  if (! $Cnf{"UpdateCurrTZ"});
@@ -1400,7 +1400,7 @@
         $date=&DateCalc("1970-01-01 00:00 GMT","+0:0:$s");
 
       } elsif ( (/^$now$/i  &&  ($tmp="Now"))  ||
-                (/^$today$/ &&  ($tmp="Today")) ) {
+                (/^$today$/i &&  ($tmp="Today")) ) {
         # now, today
         &Date_Init()  if (! $Cnf{"UpdateCurrTZ"});
         $date=$Curr{$tmp};

Reply via email to