Lines Matching refs:dfo
30 static void internal_set_calendar(IntlDateFormatter_object *dfo, char* timezone_id, int timezone_id… in internal_set_calendar() argument
46 …16(&timezone_utf16, &timezone_utf16_len, timezone_id, timezone_id_len, &INTL_DATA_ERROR_CODE(dfo)); in internal_set_calendar()
47 INTL_METHOD_CHECK_STATUS(dfo, "Error converting timezone to UTF-16" ); in internal_set_calendar()
50 … = (char *)udat_getLocaleByType(DATE_FORMAT_OBJECT(dfo), ULOC_ACTUAL_LOCALE, &INTL_DATA_ERROR_CODE… in internal_set_calendar()
53 …obj = ucal_open(timezone_utf16, timezone_utf16_len, locale, calendar, &INTL_DATA_ERROR_CODE(dfo) ); in internal_set_calendar()
54 udat_setCalendar( DATE_FORMAT_OBJECT(dfo), ucal_obj ); in internal_set_calendar()
55 INTL_METHOD_CHECK_STATUS(dfo, "Error setting the calendar."); in internal_set_calendar()
82 INTL_METHOD_CHECK_STATUS(dfo, "Error getting formatter datetype." ); in PHP_FUNCTION()
84 RETURN_LONG(dfo->date_type ); in PHP_FUNCTION()
108 INTL_METHOD_CHECK_STATUS(dfo, "Error getting formatter timetype." ); in PHP_FUNCTION()
110 RETURN_LONG(dfo->time_type ); in PHP_FUNCTION()
135 INTL_METHOD_CHECK_STATUS(dfo, "Error getting formatter calendar." ); in PHP_FUNCTION()
137 RETURN_LONG(dfo->calendar); in PHP_FUNCTION()
161 INTL_METHOD_CHECK_STATUS(dfo, "Error getting formatter timezone_id." ); in PHP_FUNCTION()
163 if( dfo->timezone_id ){ in PHP_FUNCTION()
164 RETURN_STRING((char*)dfo->timezone_id, TRUE ); in PHP_FUNCTION()
194 internal_set_calendar( dfo, timezone_id, timezone_id_len, dfo->calendar, return_value TSRMLS_CC ); in PHP_FUNCTION()
197 if( dfo->timezone_id ){ in PHP_FUNCTION()
198 efree(dfo->timezone_id); in PHP_FUNCTION()
200 dfo->timezone_id = estrndup(timezone_id, timezone_id_len); in PHP_FUNCTION()
230 …ength = udat_toPattern(DATE_FORMAT_OBJECT(dfo), is_pattern_localized, value, length, &INTL_DATA_ER… in PHP_FUNCTION()
231 if(INTL_DATA_ERROR_CODE(dfo) == U_BUFFER_OVERFLOW_ERROR && length >= USIZE( value_buf )) { in PHP_FUNCTION()
233 INTL_DATA_ERROR_CODE(dfo) = U_ZERO_ERROR; in PHP_FUNCTION()
235 …ength = udat_toPattern(DATE_FORMAT_OBJECT(dfo), is_pattern_localized, value, length, &INTL_DATA_ER… in PHP_FUNCTION()
236 if(U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) { in PHP_FUNCTION()
241 INTL_METHOD_CHECK_STATUS(dfo, "Error getting formatter pattern" ); in PHP_FUNCTION()
243 INTL_METHOD_RETVAL_UTF8( dfo, value, length, ( value != value_buf ) ); in PHP_FUNCTION()
275 intl_convert_utf8_to_utf16(&svalue, &slength, value, value_len, &INTL_DATA_ERROR_CODE(dfo)); in PHP_FUNCTION()
276 INTL_METHOD_CHECK_STATUS(dfo, "Error converting pattern to UTF-16" ); in PHP_FUNCTION()
278 udat_applyPattern(DATE_FORMAT_OBJECT(dfo), (UBool)is_pattern_localized, svalue, slength); in PHP_FUNCTION()
283 INTL_METHOD_CHECK_STATUS(dfo, "Error setting symbol value"); in PHP_FUNCTION()
314 loc = (char *)udat_getLocaleByType(DATE_FORMAT_OBJECT(dfo), loc_type,&INTL_DATA_ERROR_CODE(dfo)); in PHP_FUNCTION()
315 INTL_METHOD_CHECK_STATUS(dfo, "Error getting locale"); in PHP_FUNCTION()
343 RETVAL_BOOL(udat_isLenient(DATE_FORMAT_OBJECT(dfo))); in PHP_FUNCTION()
370 udat_setLenient(DATE_FORMAT_OBJECT(dfo), (UBool)isLenient ); in PHP_FUNCTION()
403 …internal_set_calendar( dfo, dfo->timezone_id, strlen(dfo->timezone_id), calendar, return_value TSR… in PHP_FUNCTION()
406 dfo->calendar = calendar; in PHP_FUNCTION()