sub match_creation_day ($$;@) {
my $d=shift;
if ($d !~ /^\d+$/) {
- return IkiWiki::FailReason->new('invalid day');
+ return IkiWiki::ErrorReason->new("invalid day $d");
}
if ((localtime($IkiWiki::pagectime{shift()}))[3] == shift) {
return IkiWiki::SuccessReason->new('creation_day matched');
sub match_creation_month ($$;@) {
my $m=shift;
if ($m !~ /^\d+$/) {
- return IkiWiki::FailReason->new('invalid month');
+ return IkiWiki::ErrorReason->new("invalid month $m");
}
if ((localtime($IkiWiki::pagectime{shift()}))[4] + 1 == shift) {
return IkiWiki::SuccessReason->new('creation_month matched');
sub match_creation_year ($$;@) {
my $y=shift;
if ($y !~ /^\d+$/) {
- return IkiWiki::FailReason->new('invalid year');
+ return IkiWiki::ErrorReason->new("invalid year $y");
}
if ((localtime($IkiWiki::pagectime{shift()}))[5] + 1900 == $y) {
return IkiWiki::SuccessReason->new('creation_year matched');
tags matched by a glob)
* "`backlink(page)`" - matches only pages that a given page links to
* "`creation_month(month)`" - matches only files created on the given month
+ number
* "`creation_day(mday)`" - or day of the month
* "`creation_year(year)`" - or year
* "`created_after(page)`" - matches only files created after the given page