/php-src/ext/intl/tests/ |
H A D | calendar_createInstance_variation1.phpt | 12 $cal = intlcal_create_instance('Europe/Amsterdam'); 13 print_R($cal->getTimeZone()); 14 print_R($cal->getLocale(Locale::ACTUAL_LOCALE)); 18 print_R($cal->getTimeZone()); 19 print_R($cal->getLocale(Locale::ACTUAL_LOCALE)); 23 print_R($cal->getTimeZone()); 24 print_R($cal->getLocale(Locale::ACTUAL_LOCALE)); 27 $cal = intlcal_create_instance(null, "pt"); 28 print_R($cal->getTimeZone()); 29 print_R($cal->getLocale(Locale::ACTUAL_LOCALE)); [all …]
|
H A D | calendar_fromDateTime_basic.phpt | 11 $cal = IntlCalendar::fromDateTime('2012-01-01 00:00:00 Europe/Rome'); 13 $cal->getTime(), 15 $cal->getTimeZone()->getID(), 16 $cal->getLocale(1) 20 $cal = IntlCalendar::fromDateTime(new DateTime('2012-01-01 00:00:00 PST'), "pt_PT"); 22 $cal->getTime(), 24 $cal->getTimeZone()->getID(), 25 $cal->getLocale(1) 30 $cal = intlcal_from_date_time(new DateTime('2012-01-01 00:00:00 +03:40')); 32 $cal->getTime(), [all …]
|
H A D | dateformat_formatObject_calendar.phpt | 13 $cal = IntlCalendar::fromDateTime('2012-01-01 00:00:00'); //Europe/Lisbon 14 echo IntlDateFormatter::formatObject($cal), "\n"; 15 echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL), "\n"; 16 echo IntlDateFormatter::formatObject($cal, null, "en-US"), "\n"; 18 echo IntlDateFormatter::formatObject($cal, 'E y-MM-d HH,mm,ss.SSS v', "en-US"), "\n"; 20 $cal = IntlCalendar::fromDateTime('2012-01-01 05:00:00+03:00'); 21 echo datefmt_format_object($cal, IntlDateFormatter::FULL), "\n"; 23 $cal = IntlCalendar::createInstance(null,'en-US@calendar=islamic-civil'); 24 $cal->setTime(strtotime('2012-01-01 00:00:00')*1000.); 25 echo IntlDateFormatter::formatObject($cal), "\n"; [all …]
|
H A D | dateformat_formatObject_calendar_variant2.phpt | 13 $cal = IntlCalendar::fromDateTime('2012-01-01 00:00:00'); //Europe/Lisbon 14 echo IntlDateFormatter::formatObject($cal), "\n"; 15 echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL), "\n"; 16 echo IntlDateFormatter::formatObject($cal, null, "en-US"), "\n"; 18 echo IntlDateFormatter::formatObject($cal, 'E y-MM-d HH,mm,ss.SSS v', "en-US"), "\n"; 20 $cal = IntlCalendar::fromDateTime('2012-01-01 05:00:00+03:00'); 21 echo datefmt_format_object($cal, IntlDateFormatter::FULL), "\n"; 23 $cal = IntlCalendar::createInstance(null,'en-US@calendar=islamic-civil'); 24 $cal->setTime(strtotime('2012-01-01 00:00:00')*1000.); 25 echo IntlDateFormatter::formatObject($cal), "\n"; [all …]
|
H A D | dateformat_formatObject_calendar_variant3.phpt | 14 $cal = IntlCalendar::fromDateTime('2012-01-01 00:00:00'); //Europe/Lisbon 15 echo IntlDateFormatter::formatObject($cal), "\n"; 16 echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL), "\n"; 17 echo IntlDateFormatter::formatObject($cal, null, "en-US"), "\n"; 19 echo IntlDateFormatter::formatObject($cal, 'E y-MM-d HH,mm,ss.SSS v', "en-US"), "\n"; 21 $cal = IntlCalendar::fromDateTime('2012-01-01 05:00:00+03:00'); 22 echo datefmt_format_object($cal, IntlDateFormatter::FULL), "\n"; 24 $cal = IntlCalendar::createInstance(null,'en-US@calendar=islamic-civil'); 25 $cal->setTime(strtotime('2012-01-01 00:00:00')*1000.); 26 echo IntlDateFormatter::formatObject($cal), "\n"; [all …]
|
H A D | dateformat_formatObject_calendar_variant4.phpt | 14 $cal = IntlCalendar::fromDateTime('2012-01-01 00:00:00'); //Europe/Lisbon 15 echo IntlDateFormatter::formatObject($cal), "\n"; 16 echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL), "\n"; 17 echo IntlDateFormatter::formatObject($cal, null, "en-US"), "\n"; 19 echo IntlDateFormatter::formatObject($cal, 'E y-MM-d HH,mm,ss.SSS v', "en-US"), "\n"; 21 $cal = IntlCalendar::fromDateTime('2012-01-01 05:00:00+03:00'); 22 echo datefmt_format_object($cal, IntlDateFormatter::FULL), "\n"; 24 $cal = IntlCalendar::createInstance(null,'en-US@calendar=islamic-civil'); 25 $cal->setTime(strtotime('2012-01-01 00:00:00')*1000.); 26 echo IntlDateFormatter::formatObject($cal), "\n"; [all …]
|
H A D | dateformat_formatObject_calendar_variant5.phpt | 14 $cal = IntlCalendar::fromDateTime('2012-01-01 00:00:00'); //Europe/Lisbon 15 echo IntlDateFormatter::formatObject($cal), "\n"; 16 echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL), "\n"; 17 echo IntlDateFormatter::formatObject($cal, null, "en-US"), "\n"; 19 echo IntlDateFormatter::formatObject($cal, 'E y-MM-d HH,mm,ss.SSS v', "en-US"), "\n"; 21 $cal = IntlCalendar::fromDateTime('2012-01-01 05:00:00+03:00'); 22 echo datefmt_format_object($cal, IntlDateFormatter::FULL), "\n"; 24 $cal = IntlCalendar::createInstance(null,'en-US@calendar=islamic-civil'); 25 $cal->setTime(strtotime('2012-01-01 00:00:00')*1000.); 26 echo IntlDateFormatter::formatObject($cal), "\n"; [all …]
|
H A D | dateformat_formatObject_calendar_variant_icu72-1.phpt | 13 $cal = IntlCalendar::fromDateTime('2012-01-01 00:00:00'); //Europe/Lisbon 14 echo IntlDateFormatter::formatObject($cal), "\n"; 15 echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL), "\n"; 16 echo IntlDateFormatter::formatObject($cal, null, "en-US"), "\n"; 18 echo IntlDateFormatter::formatObject($cal, 'E y-MM-d HH,mm,ss.SSS v', "en-US"), "\n"; 20 $cal = IntlCalendar::fromDateTime('2012-01-01 05:00:00+03:00'); 21 echo datefmt_format_object($cal, IntlDateFormatter::FULL), "\n"; 23 $cal = IntlCalendar::createInstance(null,'en-US@calendar=islamic-civil'); 24 $cal->setTime(strtotime('2012-01-01 00:00:00')*1000.); 25 echo IntlDateFormatter::formatObject($cal), "\n"; [all …]
|
H A D | calendar_createInstance_basic.phpt | 12 $cal = IntlCalendar::createInstance(); 13 print_R($cal->getTimeZone()); 14 print_R($cal->getLocale(Locale::ACTUAL_LOCALE)); 16 print_R($cal->getType()); 19 $timeMillis = $cal->getTime();
|
H A D | calendar_toDateTime_error.phpt | 10 $cal = new IntlGregorianCalendar("Etc/Unknown"); 12 var_dump($cal->toDateTime()); 18 var_dump(intlcal_to_date_time($cal)); 23 $cal = IntlCalendar::createInstance("Etc/Unknown"); 25 var_dump($cal->toDateTime()); 31 var_dump(intlcal_to_date_time($cal));
|
H A D | dateformat_create_cal_arg.phpt | 15 $cal = new IntlGregorianCalendar('UTC', NULL); 16 $df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal); 19 $cal = IntlCalendar::createInstance('UTC', 'en@calendar=islamic'); 20 $df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal); 24 $cal = new IntlGregorianCalendar('UTC', NULL); 25 $df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Madrid', $cal);
|
H A D | dateformat_create_cal_arg_variant2.phpt | 15 $cal = new IntlGregorianCalendar('UTC', NULL); 16 $df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal); 19 $cal = IntlCalendar::createInstance('UTC', 'en@calendar=islamic'); 20 $df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal); 24 $cal = new IntlGregorianCalendar('UTC', NULL); 25 $df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Madrid', $cal);
|
H A D | dateformat_create_cal_arg_variant3.phpt | 16 $cal = new IntlGregorianCalendar('UTC', NULL); 17 $df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal); 20 $cal = IntlCalendar::createInstance('UTC', 'en@calendar=islamic'); 21 $df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal); 25 $cal = new IntlGregorianCalendar('UTC', NULL); 26 $df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Madrid', $cal);
|
H A D | dateformat_create_cal_arg_variant5.phpt | 15 $cal = new IntlGregorianCalendar('UTC', NULL); 16 $df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal); 19 $cal = IntlCalendar::createInstance('UTC', 'en@calendar=islamic'); 20 $df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal); 24 $cal = new IntlGregorianCalendar('UTC', NULL); 25 $df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Madrid', $cal);
|
H A D | dateformat_create_cal_arg_variant4.phpt | 16 $cal = new IntlGregorianCalendar('UTC', NULL); 17 $df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal); 20 $cal = IntlCalendar::createInstance('UTC', 'en@calendar=islamic'); 21 $df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal); 25 $cal = new IntlGregorianCalendar('UTC', NULL); 26 $df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Madrid', $cal);
|
H A D | dateformat_formatObject_error.phpt | 22 $cal = IntlCalendar::createInstance(); 23 var_dump(IntlDateFormatter::formatObject($cal, -2)); 24 var_dump(IntlDateFormatter::formatObject($cal, array())); 25 var_dump(IntlDateFormatter::formatObject($cal, array(1,2,3))); 26 var_dump(IntlDateFormatter::formatObject($cal, array(array(), 1))); 27 var_dump(IntlDateFormatter::formatObject($cal, array(1, -2))); 28 var_dump(IntlDateFormatter::formatObject($cal, ""));
|
H A D | dateformat_get_set_calendar.phpt | 28 //changing the calendar with a cal type should not change tz 33 $cal = IntlCalendar::createInstance("UTC"); 34 $df->setCalendar($cal);
|
H A D | dateformat_get_set_calendar_variant2.phpt | 28 //changing the calendar with a cal type should not change tz 33 $cal = IntlCalendar::createInstance("UTC"); 34 $df->setCalendar($cal);
|
H A D | dateformat_get_set_calendar_variant3.phpt | 29 //changing the calendar with a cal type should not change tz 34 $cal = IntlCalendar::createInstance("UTC"); 35 $df->setCalendar($cal);
|
/php-src/ext/intl/dateformat/ |
H A D | dateformat_helpers.cpp | 33 …const char *func_name, intl_error *err, Calendar*& cal, zend_long& cal_int_type, bool& calendar_ow… in datefmt_process_calendar_arg() argument 40 cal = new GregorianCalendar(locale, status); in datefmt_process_calendar_arg() 57 cal = Calendar::createInstance(locale, status); in datefmt_process_calendar_arg() 59 cal = new GregorianCalendar(locale, status); in datefmt_process_calendar_arg() 66 cal = calendar_fetch_native_calendar(calendar_obj); in datefmt_process_calendar_arg() 67 if (cal == NULL) { in datefmt_process_calendar_arg() 86 if (cal == NULL && !U_FAILURE(status)) { in datefmt_process_calendar_arg()
|
H A D | dateformat_attrcpp.cpp | 141 const Calendar *cal = fetch_datefmt(dfo)->getCalendar(); in PHP_FUNCTION() local 142 if (cal == NULL) { in PHP_FUNCTION() 146 Calendar *cal_clone = cal->clone(); in PHP_FUNCTION() 181 Calendar *cal; in PHP_FUNCTION() local 190 "datefmt_set_calendar", INTL_DATA_ERROR_P(dfo), cal, cal_type, cal_owned) == FAILURE in PHP_FUNCTION() 202 delete cal; in PHP_FUNCTION() 205 cal->adoptTimeZone(old_timezone); in PHP_FUNCTION() 207 cal = cal->clone(); in PHP_FUNCTION() 208 if (UNEXPECTED(cal == NULL)) { in PHP_FUNCTION() 216 fetch_datefmt(dfo)->adoptCalendar(cal); in PHP_FUNCTION()
|
H A D | dateformat_create.cpp | 59 Calendar *cal = NULL; in datefmt_ctor() local 122 INTL_DATA_ERROR_P(dfo), cal, calendar_type, calendar_owned) == FAILURE in datefmt_ctor() 166 df->adoptCalendar(cal); in datefmt_ctor() 169 df->setCalendar(*cal); in datefmt_ctor() 194 if (cal != NULL && calendar_owned) { in datefmt_ctor() 195 delete cal; in datefmt_ctor()
|
H A D | dateformat_format_object.cpp | 76 Calendar *cal = NULL; in PHP_FUNCTION() local 170 cal = obj_cal->clone(); in PHP_FUNCTION() 176 cal = new GregorianCalendar(Locale::createFromName(locale_str), status); in PHP_FUNCTION() 219 df->adoptCalendar(cal); in PHP_FUNCTION() 220 cal = NULL; in PHP_FUNCTION() 244 delete cal; in PHP_FUNCTION()
|
/php-src/ext/calendar/ |
H A D | calendar.c | 153 zend_long cal = -1; in PHP_FUNCTION() local 159 if (cal == -1) { in PHP_FUNCTION() 172 if (cal < 0 || cal >= CAL_NUM_CALS) { in PHP_FUNCTION() 177 _php_cal_info(cal, return_value); in PHP_FUNCTION() 184 zend_long cal, month, year; in PHP_FUNCTION() local 192 if (cal < 0 || cal >= CAL_NUM_CALS) { in PHP_FUNCTION() 231 zend_long cal, month, day, year; in PHP_FUNCTION() local 237 if (cal < 0 || cal >= CAL_NUM_CALS) { in PHP_FUNCTION() 249 zend_long jd, cal; in PHP_FUNCTION() local 257 if (cal < 0 || cal >= CAL_NUM_CALS) { in PHP_FUNCTION() [all …]
|
/php-src/ext/intl/calendar/ |
H A D | calendar_class.cpp | 138 const Calendar *cal; in Calendar_get_debug_info() local 146 cal = co->ucal; in Calendar_get_debug_info() 148 if (cal == NULL) { in Calendar_get_debug_info() 156 ZVAL_STRING(&zv, const_cast<char*>(cal->getType())); in Calendar_get_debug_info() 164 timezone_object_construct(&cal->getTimeZone(), &ztz , 0); in Calendar_get_debug_info() 178 Locale locale = cal->getLocale(ULOC_VALID_LOCALE, uec); in Calendar_get_debug_info() 195 int32_t res = cal->get(debug_info_fields[i].field, uec); in Calendar_get_debug_info()
|