mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-27 02:54:27 +00:00
An hour is >= 60 minutes, not just > ... and so on.
This commit is contained in:
parent
2e50a0721a
commit
cea76a8fbb
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user