From cea76a8fbb243820a483aa057d76eab5ca04f9da Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sun, 17 Dec 2006 21:37:05 +1300 Subject: [PATCH] An hour is >= 60 minutes, not just > ... and so on. --- inc/RRule.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/RRule.php b/inc/RRule.php index 28cad2f9..52088dc8 100644 --- a/inc/RRule.php +++ b/inc/RRule.php @@ -314,7 +314,7 @@ class iCalDate { /** Also somewhat simpler if we can use seconds */ $diff = $from->_epoch - $this->_epoch; $result = ""; - if ( $diff > 86400) { + if ( $diff >= 86400) { $result = intval($diff / 86400); $diff = $diff % 86400; if ( $diff == 0 && (($result % 7) == 0) ) { @@ -325,11 +325,11 @@ class iCalDate { $result .= "D"; } $result = "P".$result."T"; - if ( $diff > 3600) { + if ( $diff >= 3600) { $result .= intval($diff / 3600) . "H"; $diff = $diff % 3600; } - if ( $diff > 60) { + if ( $diff >= 60) { $result .= intval($diff / 60) . "M"; $diff = $diff % 60; }