1--TEST--
2MessageFormat accepts IntlCalendar args
3--EXTENSIONS--
4intl
5--SKIPIF--
6<?php
7if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1');
8if (str_contains(PHP_OS, 'FreeBSD')) {
9    die('xfail Fails on FreeBSD for unknown reason');
10}
11?>
12--FILE--
13<?php
14ini_set("intl.error_level", E_WARNING);
15//ini_set("intl.default_locale", "nl");
16ini_set('date.timezone', 'Europe/Lisbon');
17
18$cal = new IntlGregorianCalendar(2012,04,17,17,35,36);
19
20$msgf = new MessageFormatter('pt_PT', '{0,date,full} {0,time,h:m:s a V}');
21echo $msgf->format(array($cal)), "\n";
22
23//NOT FIXED:
24/*$msgf = new MessageFormatter('en_US',
25'{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}');
26
27echo "msgf2: ", $msgf->format(array($time, 'date')), " ",
28        $msgf->format(array($time, 'time')), "\n";
29*/
30
31?>
32--EXPECT--
33quinta-feira, 17 de maio de 2012 5:35:36 da tarde ptlis
34