1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/intl/tests/dateformat_create_default.phpt
Christoph M. Becker a9e7b90cc2 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.

(cherry picked from commit 8dd51b462d)

Fixes GH-10262.
2023-01-09 14:08:40 +01: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