diff options
author | Ondřej Surý <ondrej@sury.org> | 2014-12-21 19:07:19 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2014-12-21 19:07:19 +0100 |
commit | 60fede4c90746ef3408ed27a15dd405b3a46a83b (patch) | |
tree | 068e6a8018345664b5d0e8d838995a4a3e97cc3d /ext/intl/tests/msgfmt_format_intlcalendar_variant4.phpt | |
parent | f40f1ce174885cd0f526c003eca3fa523e0ef269 (diff) | |
download | php-upstream/5.6.4+dfsg.tar.gz |
New upstream version 5.6.4+dfsgupstream/5.6.4+dfsg
Diffstat (limited to 'ext/intl/tests/msgfmt_format_intlcalendar_variant4.phpt')
-rw-r--r-- | ext/intl/tests/msgfmt_format_intlcalendar_variant4.phpt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ext/intl/tests/msgfmt_format_intlcalendar_variant4.phpt b/ext/intl/tests/msgfmt_format_intlcalendar_variant4.phpt new file mode 100644 index 000000000..8f778b902 --- /dev/null +++ b/ext/intl/tests/msgfmt_format_intlcalendar_variant4.phpt @@ -0,0 +1,30 @@ +--TEST-- +MessageFormat accepts IntlCalendar args +--SKIPIF-- +<?php +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?> +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); +//ini_set("intl.default_locale", "nl"); +ini_set('date.timezone', 'Europe/Lisbon'); + +$cal = new IntlGregorianCalendar(2012,04,17,17,35,36); + +$msgf = new MessageFormatter('pt_PT', '{0,date,full} {0,time,h:m:s a V}'); +echo $msgf->format(array($cal)), "\n"; + +//NOT FIXED: +/*$msgf = new MessageFormatter('en_US', +'{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}'); + +echo "msgf2: ", $msgf->format(array($time, 'date')), " ", + $msgf->format(array($time, 'time')), "\n"; +*/ + +?> +==DONE== +--EXPECT-- +quinta-feira, 17 de maio de 2012 5:35:36 da tarde ptlis +==DONE== |