aboutsummaryrefslogtreecommitdiff
path: root/ikiwiki-calendar
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-11 23:44:50 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-11 23:44:50 -0400
commit1c6794f46a729eea8c7e7d49fcf7c6a54dae2ba9 (patch)
treefb7bbb0fa72a15dfc45809b473e3236e832d71c6 /ikiwiki-calendar
parent4cce29259353223b1091a83e03748ae4b34b0796 (diff)
downloadikiwiki-1c6794f46a729eea8c7e7d49fcf7c6a54dae2ba9.tar
ikiwiki-1c6794f46a729eea8c7e7d49fcf7c6a54dae2ba9.tar.gz
allow spans
Diffstat (limited to 'ikiwiki-calendar')
-rwxr-xr-xikiwiki-calendar5
1 files changed, 3 insertions, 2 deletions
diff --git a/ikiwiki-calendar b/ikiwiki-calendar
index 074f0d6fd..a9548d6ec 100755
--- a/ikiwiki-calendar
+++ b/ikiwiki-calendar
@@ -15,7 +15,8 @@ GetOptions(
) || usage();
my $setup=shift || usage();
my $pagespec=shift || "*";
-my $year=shift || 1900+(localtime(time))[5];
+my $startyear=shift || 1900+(localtime(time))[5];
+my $endyear=shift || $startyear;
%config=IkiWiki::defaultconfig();
IkiWiki::Setup::load($setup);
@@ -43,7 +44,7 @@ sub writearchive ($$;$) {
}
}
-foreach my $y ($year-1, $year, $year+1) {
+foreach my $y ($startyear..$endyear) {
writearchive("calendaryear.tmpl", $y);
foreach my $m (qw{01 02 03 04 05 06 07 08 09 10 11 12}) {
writearchive("calendarmonth.tmpl", $y, $m);