diff options
author | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2014-09-05 13:09:06 +0000 |
---|---|---|
committer | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2014-09-05 13:09:06 +0000 |
commit | 0d9a3b6be7585938638a15e29e8d24c391d20a4b (patch) | |
tree | b310377656e4ba88c339531b8f178240e770cd0f | |
parent | 3269f3a3979401ad42e96e9010bfea2f64ab6edc (diff) | |
download | pmwiki.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.php | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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]++; } |