diff options
| author | Rasmus Lerdorf <rasmus@php.net> | 2013-10-31 16:23:38 -0700 |
|---|---|---|
| committer | Rasmus Lerdorf <rasmus@php.net> | 2013-10-31 16:23:38 -0700 |
| commit | bb42643ae02c6bb522db169748d29e4be6695b1e (patch) | |
| tree | 25b73836901583f8e42f5a9c6fe235f88efe7d8e /ext/intl/tests/dateformat_calendars_variant2.phpt | |
| parent | 6b68f44e6b46dffd7fe029eca7afc37f1fa57347 (diff) | |
| parent | 55ee543e2f73c45c8fa2c51ebef9820a610f70b4 (diff) | |
| download | php-git-bb42643ae02c6bb522db169748d29e4be6695b1e.tar.gz | |
Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src: (107 commits)
Typo fix: umknown -> unknown
add news entry about FPM backlog change
Fix bug #66008
updated libs_versions.txt
Update NEWS
Update NEWS
Fixed Bug 64760 var_export() does not use full precision for floating-point numbers
add bundled libzip LICENSE, as required by BSD License terms
- Updated to version 2013.8 (2013h)
Use zval* instead of zval**
Increased limit for opcache.max_accelerated_files to 1,000,000. (Chris)
Improved performance of array_merge() by eliminating useless copying
Improved performance of func_get_args() by eliminating useless copying
Link to more readmes
increase backlog to the highest value everywhere
Update NEWS
Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
- Updated to version 2013.7 (2013g)
Increment version number, since this will be 5.5.6.
Added Zend Debugger to the note about the load order (by trash4you at online dot de)
...
Diffstat (limited to 'ext/intl/tests/dateformat_calendars_variant2.phpt')
| -rw-r--r-- | ext/intl/tests/dateformat_calendars_variant2.phpt | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/ext/intl/tests/dateformat_calendars_variant2.phpt b/ext/intl/tests/dateformat_calendars_variant2.phpt new file mode 100644 index 0000000000..61cdea8408 --- /dev/null +++ b/ext/intl/tests/dateformat_calendars_variant2.phpt @@ -0,0 +1,45 @@ +--TEST-- +IntlDateFormatter, calendars and time zone +--INI-- +date.timezone=Atlantic/Azores +--SKIPIF-- +<?php +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); + +$fmt1 = new IntlDateFormatter('en_US', + IntlDateFormatter::FULL, + IntlDateFormatter::FULL, + 'GMT+05:12', + IntlDateFormatter::TRADITIONAL); +$fmt2 = new IntlDateFormatter('en_US', + IntlDateFormatter::FULL, + IntlDateFormatter::FULL, + 'GMT+05:12', + IntlDateFormatter::GREGORIAN); +$fmt3 = new IntlDateFormatter('en_US@calendar=hebrew', + IntlDateFormatter::FULL, + IntlDateFormatter::FULL, + 'GMT+05:12', + IntlDateFormatter::TRADITIONAL); +var_dump($fmt1->format(strtotime('2012-01-01 00:00:00 +0000'))); +var_dump($fmt2->format(strtotime('2012-01-01 00:00:00 +0000'))); +var_dump($fmt3->format(strtotime('2012-01-01 00:00:00 +0000'))); + +new IntlDateFormatter('en_US@calendar=hebrew', + IntlDateFormatter::FULL, + IntlDateFormatter::FULL, + 'GMT+05:12', + -1); +?> +==DONE== +--EXPECTF-- +string(47) "Sunday, January 1, 2012 at 5:12:00 AM GMT+05:12" +string(47) "Sunday, January 1, 2012 at 5:12:00 AM GMT+05:12" +string(48) "Sunday, Tevet 6, 5772 AM at 5:12:00 AM GMT+05:12" + +Warning: IntlDateFormatter::__construct(): datefmt_create: invalid value for calendar type; it must be one of IntlDateFormatter::TRADITIONAL (locale's default calendar) or IntlDateFormatter::GREGORIAN. Alternatively, it can be an IntlCalendar object in %sdateformat_calendars_variant2.php on line %d +==DONE== |
