1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 18:22:42 +01:00
Files
archived-php-src/ext/intl/tests/dateformat_create_default.phpt
2021-05-17 09:24:49 +02:00

25 lines
595 B
PHP

--TEST--
IntlDateFormatter::create() with default date and time types
--EXTENSIONS--
intl
--INI--
date.timezone=UTC
--FILE--
<?php
$ts = strtotime('2012-01-01 00:00:00 UTC');
$fmt = IntlDateFormatter::create('en_US');
echo $fmt->format($ts), "\n";
$fmt = new IntlDateFormatter('en_US');
echo $fmt->format($ts), "\n";
$fmt = datefmt_create('en_US');
echo $fmt->format($ts), "\n";
?>
--EXPECT--
Sunday, January 1, 2012 at 12:00:00 AM Coordinated Universal Time
Sunday, January 1, 2012 at 12:00:00 AM Coordinated Universal Time
Sunday, January 1, 2012 at 12:00:00 AM Coordinated Universal Time