mirror of
https://github.com/php/php-src.git
synced 2024-12-01 05:43:38 +08:00
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: added a test for date_interval_format function Merge branch 'pull-request/2198'
This commit is contained in:
commit
d1910f66e5
21
ext/date/tests/date_interval_format.phpt
Normal file
21
ext/date/tests/date_interval_format.phpt
Normal file
@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Test date_interval_format() function : basic functionality
|
||||
--CREDITS--
|
||||
Jean Carlo Machado <contato@jeancarlomachado.com.br>
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$interval = new DateInterval('P2Y4DT6H8M');
|
||||
echo date_interval_format($interval, '%d days');
|
||||
|
||||
echo PHP_EOL;
|
||||
|
||||
$interval = new DateInterval('P32D');
|
||||
echo date_interval_format($interval, '%d days');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
4 days
|
||||
32 days
|
Loading…
Reference in New Issue
Block a user