Folgende Objekte :
$startdatum :
$enddatum ;
zwei Varianten die Differenz zu ermitteln, wobei das Zweite lt. Doku ja ein Alias zum Ersten ist:
Ergebnis in beiden Fällen:
wo ist mein Denkfehler?
was mache ich falsch?
Ich danke euch
$startdatum :
PHP-Code:
DateTime object {
date => (string) 2016-04-14 09:00:00
timezone_type => (int) 3
timezone => (string) Europe/Berlin
}
PHP-Code:
DateTime object {
date => (string) 2016-04-14 10:00:00
timezone_type => (int) 3
timezone => (string) Europe/Berlin
}
PHP-Code:
$dDiff = $startdatum->diff($enddatum);
$dDiff = date_diff($startdatum, $enddatum);
PHP-Code:
DateInterval object {
y => (int) 0
m => (int) 0
d => (int) 0
h => (int) 1
i => (int) 0
s => (int) 0
weekday => (int) 0
weekday_behavior => (int) 0
first_last_day_of => (int) 0
invert => (int) 0
days => (int) 0
special_type => (int) 0
special_amount => (int) 0
have_weekday_relative => (int) 0
have_special_relative => (int) 0
}
was mache ich falsch?
Ich danke euch
Kommentar