1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00
Files
archived-php-src/ext/intl/tests/dateformat_create_default.phpt
T
Christoph M. Becker 8dd51b462d Adapt ext/intl tests for ICU 72.1
This version replaces SPACEs before the meridian with NARROW NO-BREAK
SPACEs.  Thus, we split the affected test cases as usual.

Fixes GH-9799.
Closes GH-9800.
2022-10-22 10:31:50 +02:00

27 lines
695 B
PHP

--TEST--
IntlDateFormatter::create() with default date and time types
--EXTENSIONS--
intl
--INI--
date.timezone=UTC
--SKIPIF--
<?php if (version_compare(INTL_ICU_VERSION, '72.1') >= 0) die('skip for ICU < 72.1'); ?>
--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