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