Skip to content

Commit

Permalink
Merge pull request #19 from matzekuh/issue-#15
Browse files Browse the repository at this point in the history
end date functionality in dev branch
  • Loading branch information
matzekuh committed Mar 30, 2017
2 parents c8826e9 + a38675a commit 2546e14
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion syntax.php
Expand Up @@ -144,7 +144,13 @@ function handle($match, $state, $pos, Doku_Handler $handler) {
$params['closed'] = 1;
} else
if (strcmp($name, "CLOSED") == 0) {
$params['closed'] = strcasecmp($value, "TRUE") == 0;
if (strcasecmp($value, "TRUE") == 0) {
$params['closed'] = 1;
} else if ($time = strtotime($value)) {
if ($time < time()) $params['closed'] = 1;
} else {
$params['closed'] = 0;
}
} else
if (strcmp($name, "SORT") == 0) {
$params['sort'] = $value; // make it possible to sort by time
Expand Down

0 comments on commit 2546e14

Please sign in to comment.