PHP | IntlCalendar getTime() Function Last Updated : 25 Sep, 2019 Comments Improve Suggest changes Like Article Like Report The IntlCalendar::getTime() function is an inbuilt function in PHP which is used to return the time currently represented by the object. The time is expressed in terms of milliseconds since the epoch. Syntax: Object oriented style float IntlCalendar::getTime( void ) Procedural style float intlcal_get_time( IntlCalendar $cal ) Parameters: This function accepts single parameter $cal which holds the resource of IntlCalendar object. Return Value: This function returns a floating point number representing the milliseconds elapsed since the epoch (1 Jan 1970 00:00:00 UTC). Below program illustrates the IntlCalendar::getTime() function in PHP: Program: php <?php // Create an instance of calendar $calendar = IntlCalendar::createInstance(); // Get the current time var_dump($calendar->getTime()); // Create a new IntlGregorianCalendar $calendar = new IntlGregorianCalendar(2019, 9, 22, 12, 30, 56); // Get the current time var_dump($calendar->getTime()); // Create a DateTime object $calendar = IntlCalendar::fromDateTime('2019-03-21 09:19:29'); // Get the current time var_dump($calendar->getTime()); // Set the timezone $calendar->setTimeZone('GMT+05:30'); // Get the current time var_dump($calendar->getTime()); ?> Output: float(1569306894500) float(1571747456000) float(1553159969000) float(1553159969000) Reference: https://www.php.net/manual/en/intlcalendar.gettime.php Comment More infoAdvertise with us Next Article PHP | IntlCalendar getTime() Function jit_t Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Intl Similar Reads PHP | IntlCalendar get() Function The IntlCalendar::get() function is an inbuilt function in PHP which is used to get the value for a specific field. Syntax: Object oriented style int IntlCalendar::get( int $field ) Procedural style int intlcal_get( IntlCalendar $cal, int $field ) Parameters: This function uses two parameters as men 2 min read PHP | IntlCalendar getTimeZone() Function The IntlCalendar::getTimeZone() function is an inbuilt function in PHP which is used to return the timezone object associated with this calendar. Syntax: Object oriented style IntlTimeZone IntlCalendar::getTimeZone( void ) Procedural style IntlTimeZone intlcal_get_time_zone( IntlCalendar $cal ) Para 2 min read PHP | IntlCalendar getType() Function The IntlCalendar::getType() function is an inbuilt function in PHP which is used to get the calendar type in terms of string. The "calendar" is the valid value of keywords. Syntax: Object oriented stylestring IntlCalendar::getType( void )Procedural stylestring intlcal_get_type( IntlCalendar $cal ) P 1 min read PHP | IntlCalendar inDaylightTime() Function The IntlCalendar::inDaylightTime() function is an inbuilt function in PHP which is used to check whether the object time is in Daylight Savings Time or not. Syntax: Object oriented style bool public IntlCalendar::inDaylightTime( void ) Procedural style bool intlcal_in_daylight_time( IntlCalendar $ca 1 min read PHP | IntlCalendar getLeastMaximum() Function The IntlCalendar::getLeastMaximum() function is an inbuilt function in PHP which is used to get the smallest local maximum for a field. The value should be smaller or equal to IntlCalendar::getActualMaxmimum() which is smaller or equal to IntlCalendar::getMaximum() return value. Syntax: Object orien 1 min read PHP | IntlCalendar getActualMaximum() Function The IntlCalendar::getActualMaximum() function is an inbuilt function in PHP which is used to return the field relative maximum value around the current time. Syntax: Object oriented style int IntlCalendar::getActualMaximum( int $field ) Procedural style int intlcal_get_actual_maximum( IntlCalendar $ 1 min read PHP IntlCalendar getActualMinimum() Function The IntlCalendar::getActualMinimum() function is an inbuilt function in PHP which is used to return the field relative minimum value around the current time. Syntax: Object oriented styleint IntlCalendar::getActualMinimum( int $field )Procedural styleint intlcal_get_actual_minimum( IntlCalendar $cal 1 min read PHP | IntlCalendar getErrorCode() Function The IntlCalendar::getErrorCode() function is an inbuilt function in PHP which returns the numeric ICU error code for the last call on this object or the IntlCalendar given for the calendar parameter. This function can indicate a warning message (negative error code) or no error. Syntax: Object orien 1 min read PHP | IntlCalendar getErrorMessage() Function The IntlCalendar::getErrorMessage() function is an inbuilt function in PHP which is used to return the error message (if any error exist) associated with the error by using IntlCalendar::getErrorCode() or intlcal_get_error_code() function. Syntax: Object oriented style string IntlCalendar::getErrorM 1 min read PHP | IntlCalendar getFirstDayOfWeek() Function The IntlCalendar::getFirstDayOfWeek() function is an inbuilt function in PHP which is used to return the first day of the week for the calendar. Syntax: Object oriented style int IntlCalendar::getFirstDayOfWeek( void ) Procedural style int intlcal_get_first_day_of_week( IntlCalendar $cal ) Parameter 1 min read Like