Package: chronicle
Version: 4.6-2
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

The calendar created when HTML::CalendarMonthSimple is installed is
quite interesting:

First of all, it produces invalid XHTML, which is probably caused by
HTML::CalendarMonthSimple (last release in 2005).

But ignoring that, it links to each posting I ever made in a
December, not only in 2012. Which is not surprising since the code
only checks for the month ...

The following simple patch seems to fix this misbehaviour:

#v+
- --- unpacked/usr/bin/chronicle  2011-05-15 20:15:12.000000000 +0200
+++ /usr/bin/chronicle  2012-12-23 06:40:12.335076631 +0100
@@ -3178,6 +3178,8 @@
 
     # get 4th element from localtime aka month in form of (0..11)
     my $curmonth = (localtime)[4] + 1;
+    # get 5th element from localtime aka year in form of year-since-1900
+    my $curyear = (localtime)[5] + 1900;
 
     foreach my $f (%data)
     {
@@ -3199,7 +3201,7 @@
         my ( $year, $month, $day ) = split( /-/, $date );
 
 
- -        if ( $month eq $curmonth )
+        if ( $month eq $curmonth && $year eq $curyear )
         {
             $cal->setdatehref( $day, fileToTitle( $data{ $f }->{ 'title' } ) );
         }
#v-


Cheers,
gregor

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJQ1pwPAAoJELs6aAGGSaoGWtkP/j/bMB0/VLOc4bifqrkF2svP
k3o+rbdCOJG6uiOwrWTLuEvShGGrsYEcSz7i27nTIR4RnI5VU1/U2ZrZ802UBvIU
PHJtiMvctYNzEVlnvr/UIdgQTnLIrW1OlTIwKUaOt+y24lj4XPhB5fqTDLaRAdSe
iO/KMsUEDKv+Stea6lCPI/CfGEBd4lpoUW4yQjsbQZbMw954y0DZnbwCR7RTY12f
phxvc87GV6n+uYiOJjhfe6t2Vuzru7zEDPVZiZRPVdMsSVG6MJtOcamOJRELft7k
xXKe0aaremHTT4aKQ486kgR8dtl0RgSsqofoAfWsgD5HPV10g+hJJP9ITNQoe/2L
fmjQ4TTCxobR11ljaswFyhMiDEHpzbQZL9ZIYqGhecrH2hMFNb5PD7WnMiGKMS/x
uaSH8a1MZqtClbmUfrwAK1RiOVi2IA36yytgkqIWig0VuodGVFmPbeGvHr+sPz0Z
t8wi94NH7bSqthZQL13FeYx/FJBC6iiDoy/vzlC3tw/8jUA+xuJdKio9hcoNsWE/
ipn1oUVSulGCEjAs+u9CYkUMb4LqMAEPvUKSZN/SxJtxXWoev55lpTfZ9akZHaOG
WDSJ+eO0PdhMPVaI3v2HglDo+PMJRG9f4umFA87l+hnH/R257pAw8/U/xprTKETv
4lhUjAKbRa9LaKpk+eZU
=uMFB
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to