summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2016-11-12 11:18:42 +0100
committerKalle Sommer Nielsen <kalle@php.net>2016-11-12 11:18:42 +0100
commitb3093082fdca748846c37dd52c9b0e978cc772f4 (patch)
treee5232a6e82205a54b290fb1b478ed170b7b97032
parent4cef0ead4934f423dde2a15d336cd7a001e0471c (diff)
parent28ebf8df668014df3d74837f2fdb7a24a895bb9c (diff)
downloadphp-git-b3093082fdca748846c37dd52c9b0e978cc772f4.tar.gz
Merge branch 'master' of git.php.net:php-src
-rw-r--r--ext/date/tests/date_interval_format.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/date/tests/date_interval_format.phpt b/ext/date/tests/date_interval_format.phpt
new file mode 100644
index 0000000000..768fe46b6a
--- /dev/null
+++ b/ext/date/tests/date_interval_format.phpt
@@ -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