1--TEST--
2MessageFormat accepts IntlCalendar args
3--EXTENSIONS--
4intl
5--SKIPIF--
6<?php if (version_compare(INTL_ICU_VERSION, '51.2') || version_compare(INTL_ICU_VERSION, '52.1') >= 0) die('skip for ICU >= 51.2 and < 52.1'); ?>
7--FILE--
8<?php
9ini_set("intl.error_level", E_WARNING);
10//ini_set("intl.default_locale", "nl");
11ini_set('date.timezone', 'Europe/Lisbon');
12
13$cal = new IntlGregorianCalendar(2012,04,17,17,35,36);
14
15$msgf = new MessageFormatter('pt_PT', '{0,date,full} {0,time,h:m:s a V}');
16echo $msgf->format(array($cal)), "\n";
17
18//NOT FIXED:
19/*$msgf = new MessageFormatter('en_US',
20'{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}');
21
22echo "msgf2: ", $msgf->format(array($time, 'date')), " ",
23        $msgf->format(array($time, 'time')), "\n";
24*/
25
26?>
27--EXPECTF--
28Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d
29Quinta-feira, 17 de Maio de 2012 5:35:36 PM ptlis
30