1--TEST--
2Bug #58756: w.r.t MessageFormatter
3--EXTENSIONS--
4intl
5--SKIPIF--
6<?php
7if (str_contains(PHP_OS, 'FreeBSD')) {
8    die('xfail Fails on FreeBSD for unknown reason');
9}
10?>
11--FILE--
12<?php
13ini_set("intl.error_level", E_WARNING);
14//ini_set("intl.default_locale", "nl");
15
16$time = 1247013673;
17
18ini_set('date.timezone', 'America/New_York');
19
20$msgf = new MessageFormatter('en_US', '{0,date,full} {0,time,h:m:s a V}');
21
22echo "date:  " . date('l, F j, Y g:i:s A T', $time) . "\n";
23echo "msgf:  " . $msgf->format(array($time)) . "\n";
24
25//NOT FIXED:
26/*$msgf = new MessageFormatter('en_US',
27'{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}');
28
29echo "msgf2: ", $msgf->format(array($time, 'date')), " ",
30        $msgf->format(array($time, 'time')), "\n";
31*/
32
33?>
34--EXPECT--
35date:  Tuesday, July 7, 2009 8:41:13 PM EDT
36msgf:  Tuesday, July 7, 2009 8:41:13 PM usnyc
37