File size: 695 Bytes
1e94262 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | --TEST--
DatePeriod: Test read only properties
--INI--
date.timezone=UTC
--FILE--
<?php
$start = new DateTime;
$interval = new DateInterval('P1D');
$end = new DateTime;
$period = new DatePeriod($start, $interval, $end);
echo "recurrences: ";
var_dump($period->recurrences);
echo "include_start_date: ";
var_dump($period->include_start_date);
echo "start: ";
var_dump($period->start == $start);
echo "current: ";
var_dump($period->current);
echo "end: ";
var_dump($period->end == $end);
echo "interval: ";
var_dump($period->interval->format("%R%d"));
?>
--EXPECT--
recurrences: int(1)
include_start_date: bool(true)
start: bool(true)
current: NULL
end: bool(true)
interval: string(2) "+1"
|