aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2014-09-05 13:09:06 +0000
committerpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2014-09-05 13:09:06 +0000
commit0d9a3b6be7585938638a15e29e8d24c391d20a4b (patch)
treeb310377656e4ba88c339531b8f178240e770cd0f
parent3269f3a3979401ad42e96e9010bfea2f64ab6edc (diff)
downloadpmwiki.svn-0d9a3b6be7585938638a15e29e8d24c391d20a4b.tar.bz2
fix DRange() for ISO-8601 dates +/- X days
git-svn-id: svn://pmwiki.org/pmwiki/trunk@3002 524c5546-5005-0410-9a3e-e25e191bd360
-rw-r--r--pmwiki.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/pmwiki.php b/pmwiki.php
index 1e64d38e..542b10ea 100644
--- a/pmwiki.php
+++ b/pmwiki.php
@@ -516,7 +516,8 @@ function DRange($when) {
)? # optional -ddThh:mm:ss
(?!\d) # non-digit
/x';
- if (preg_match($dpat, $when, $m) && !preg_match('/[+-]\\s*\\d+\\s*(day|week|month|year)s?/i', $when)) {
+ if (preg_match($dpat, $when, $m) &&
+ !preg_match('/[+-]\\s*\\d+\\s*(sec(ond)?|min(ute)?|forth?night|day|week(day)?|month|year)s?/i', $when)) {
$n = $m;
## if no time given, assume range of 1 day (except when full month)
if (@$m[4]>'' && @$m[5] == '') { @$n[4]++; }