From: Joey Schulze Date: Sat, 9 Jan 2016 18:28:54 +0000 (+0000) Subject: Improvements X-Git-Url: https://git.infodrom.org/?p=infodrom.org%2Foldenburg.linux.de;a=commitdiff_plain Improvements --- diff --git a/src/Termine/years.inc b/src/Termine/years.inc index 16ca232..4415c3c 100644 --- a/src/Termine/years.inc +++ b/src/Termine/years.inc @@ -1,7 +1,7 @@ <: use Time::Local; - @month = ('dummy','Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'); + @month = ('dummy','Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'); @day = ('Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'); # Monat - Jahr @@ -28,8 +28,9 @@ <: my @y; - my $max = (localtime(time - 30*24*60*60))[5]+1900; + my $max = (localtime(time))[5]+1900; foreach my $year (2000..$max) { + next unless -f $year . '.wml'; push (@y, sprintf ("%s", $year, $year >= 2008?"php":"html", $year)) if ($year ne ""); @@ -120,7 +121,7 @@ function display_dates($past=false) $layout_foot = ''; - $nowstring = date("Y-m-"); + $nowstring = date("Y-m-d"); $today = mktime(0,0,0, date('m'), date('d'), date('Y')); sort($dates);