PHP | IntlCalendar getLeastMaximum() Function Last Updated : 25 Sep, 2019 Comments Improve Suggest changes Like Article Like Report 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 oriented style int IntlCalendar::getLeastMaximum( int $field ) Procedural style int intlcal_get_least_maximum( IntlCalendar $cal, int $field ) Parameters: This function uses two parameters as mentioned above and described below: $cal: This parameter holds the resource of IntlCalendar. $field: This parameter holds one of the IntlCalendar date/time field constants. The value of field constants are integer and lies between 0 to IntlCalendar::FIELD_COUNT. Return Value: This function returns an integer value which represents a field value in the field unit on success or FALSE on failure. Below program illustrates the IntlCalendar::getLeastMaximum() function in PHP: Program: php <?php // Set the date timezone ini_set('date.timezone', 'Asia/Calcutta'); ini_set('intl.default_locale', 'en_US'); // Create a DateTime object $calendar = IntlCalendar::fromDateTime('2019-03-21 09:19:29'); var_dump( $calendar->getLeastMaximum(IntlCalendar::FIELD_DAY_OF_MONTH), $calendar->getActualMaximum(IntlCalendar::FIELD_DAY_OF_MONTH), $calendar->getMaximum(IntlCalendar::FIELD_DAY_OF_MONTH), $calendar->getLeastMaximum(IntlCalendar::FIELD_WEEK_OF_YEAR), $calendar->getActualMaximum(IntlCalendar::FIELD_WEEK_OF_YEAR), $calendar->getMaximum(IntlCalendar::FIELD_WEEK_OF_YEAR) ); ?> Output: int(28) int(31) int(31) int(52) int(52) int(53) Reference: https://www.php.net/manual/en/intlcalendar.getleastmaximum.php Comment More infoAdvertise with us Next Article PHP | IntlCalendar getLeastMaximum() Function J jit_t Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Intl Similar Reads 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 getTime() Function 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_ge 1 min read 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 Like