Query: datefmt_get_error_code
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
DATEFMT_GET_ERROR_CODE(3) 1 DATEFMT_GET_ERROR_CODE(3) IntlDateFormatter::getErrorCode - Get the error code from last operation Object oriented styleSYNOPSISpublic int IntlDateFormatter::getErrorCode (void )DESCRIPTIONProcedural style int datefmt_get_error_code (IntlDateFormatter $fmt) Get the error code from last operation. Returns error code from the last number formatting operation.PARAMETERSo $fmt - The formatter resource.RETURN VALUESThe error code, one of UErrorCode values. Initial value is U_ZERO_ERROR.EXAMPLESExample #1 datefmt_get_error_code(3) example <?php $fmt = datefmt_create( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); $str = datefmt_format($fmt); if (!$str) { printf( "ERROR: %s (%d) ", datefmt_get_error_message($fmt), datefmt_get_error_code($fmt) ); } ?> Example #2 OO example <?php $fmt = new IntlDateFormatter( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); $str = $fmt->format(); if (!$str) { printf( "ERROR: %s (%d) ", $fmt->getErrorMessage(), $fmt->getErrorCode() ); } ?> The above example will output: ERROR: U_ZERO_ERROR (0)SEE ALSOdatefmt_get_error_message(3), intl_get_error_code(3), intl_is_failure(3). PHP Documentation Group DATEFMT_GET_ERROR_CODE(3)
Related Man Pages |
---|
intldateformatter.getcalendar(3) - php |
datefmt_format(3) - php |
datefmt_get_error_code(3) - php |
datefmt_parse(3) - php |
intldateformatter.gettimezoneid(3) - php |
Similar Topics in the Unix Linux Community |
---|
Adapter Errors and Link Errors |
Insert Title To Each Lines |
Determine FULL name of current script |
ICFB ERROR |
FULL or INCREMENTAL ??? |