PHP IntlCalendar getActualMinimum () function

PHP

Syntax:
  • Object Oriented Style
    int IntlCalendar::getActualMinimum (int $field)
  • Procedural style
    int intlcal_get_actual_minimum (IntlCalendar $cal, int $field )
Parameters:This function takes two parameters as above and described below:
  • $cal:this parameter contains an IntlCalendar resource.
  • $field:This parameter contains one of the IntlCalendar date / time field constants. This field contains an integer value from 0 to IntlCalendar::FIELD_COUNT.
Return Value:This function returns an integer value that represents the minimum value in units associated with the given field on success, or FALSE on error.The following program illustrates the IntlCalendar::getActualMinimum() function in PHP:Program:  
// Set the DateTime object ini_set ( 'date.timezone' , ' Asia / Calcutta' );  
// Declare IntlCalendar DateTime object $calendar = IntlCalendar::fromDateTime ( '2010-09-22' );  
// Using the getActualMaximum() function for the DateTime var_dump ( $calendar -> getActualMinimum (IntlCalendar: : FIELD_DAY_OF_MONTH));  
// Using the getActualMaximum() function for the DateTime var_dump ( $calendar -> getActualMinimum (IntlCalendar: : FIELD_DAY_OF_WEEK_IN_MONTH)); var_dump ( $calendar -> getActualMinimum (IntlCalendar::FIELD_MONTH)); var_dump ( $calendar -> getActualMinimum (IntlCalendar::FIELD_WEEK_OF_YEAR)); var_dump ( $calendar -> getActualMinimum (IntlCalendar::FIELD_WEEK_OF_MONTH));  
?>
Exit:
int (1 ) int (-1) int (0) int (1) int (1)
Link: https://www.php.net/manual/en/intlcalendar.getactualminimum.php