Friday, October 24, 2025
HomeLanguagesPHP IntlCalendar getActualMinimum() Function

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 style
int IntlCalendar::getActualMinimum( int $field )
  • Procedural style
int intlcal_get_actual_minimum( 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. This field contains integer value lies between 0 to IntlCalendar::FIELD_COUNT.

Return Value: This function returns the integer value which represents the minimum value in the units associated with the given field on success or FALSE on failure. 

Below examples illustrates the IntlCalendar::getActualMinimum() function in PHP: 

Example: 

php




<?php
  
// Set the DateTime object
ini_set('date.timezone', 'Asia/Calcutta');
  
// Declare an IntlCalendar DateTime object
$calendar = IntlCalendar::fromDateTime('2010-09-22');
  
// Use getActualMinimum() function to the DateTime object
var_dump($calendar->getActualMinimum(IntlCalendar::FIELD_DAY_OF_MONTH));
  
// Use getActualMinimum() function to the DateTime object
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));
  
?>


Output:

int(1)
int(-1)
int(0)
int(1)
int(1)

Reference: https://www.php.net/manual/en/intlcalendar.getactualminimum.php

RELATED ARTICLES

Most Popular

Dominic
32361 POSTS0 COMMENTS
Milvus
88 POSTS0 COMMENTS
Nango Kala
6728 POSTS0 COMMENTS
Nicole Veronica
11892 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11954 POSTS0 COMMENTS
Shaida Kate Naidoo
6852 POSTS0 COMMENTS
Ted Musemwa
7113 POSTS0 COMMENTS
Thapelo Manthata
6805 POSTS0 COMMENTS
Umr Jansen
6801 POSTS0 COMMENTS