Change language

PHP IntlCalendar getErrorMessage () function

Syntax:
  • Object Oriented Style
    string IntlCalendar::getErrorMessage (void )
  • Procedural style
    string intlcal_get_error_message (IntlCalendar $calendar)
Parameters:This function uses one parameter, $calendar,which contains the calendar object in the procedural style interface.Return value: this function returns an error message that is related to the last error that occurred when calling a function for this object, or a line that indicates no error.The program below illustrates the IntlCalendar::getErrorMessage() function in PHP:Program :  
// Set the DateTime zone ini_set ( ’ date.timezone’ , ’Asia / Calcutta’ );  
// Set intl error level ini_set ( "intl.error_level" , E_WARNING);  
// Declare a DateTime object and store it in a variable $calendar = IntlCalendar::fromDateTime ( ’2019- 03-21 09: 19: 29’ );  
// Display the error code and message var_dump ( $calendar -> getErrorMessage());  
// Declare a DateTime object and store it in a variable $calendar -> fieldDifference (-34E403, IntlCalendar::FIELD_ZONE_OFFSET);  
// Display the error code and message var_dump ( $calendar -> getErrorMessage());  
?>
Exit:
PHP Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: Call to ICU method has failed in /home/22bd84b151f5397224d747dadc65338e.php on line 16 string (12) "U_ZERO_ERROR" string (81) "intlcal_field_difference_difference: to ICURILL method pre> Link: https://www.php.net/manual/ en / intlcalendar.geterrormessage.php 



                   

Shop

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Best laptop for Minecraft

$590

Best laptop for engineering student

$

Best laptop for development

$

Best laptop for Cricut Maker

$

Best laptop for hacking

$890

Best laptop for Machine Learning

$950

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method