The IntlCalendar::isEquivalentTo() function is an inbuilt function in PHP which is used to check whether the given calendar is equal but for a different time.
- Object oriented style
bool IntlCalendar::isEquivalentTo( IntlCalendar $other )
- Procedural style
bool intlcal_is_equivalent_to( IntlCalendar $cal, IntlCalendar $other )
Parameters: This function uses two parameters as mentioned above and described below:
- $cal: This parameter holds the resource of IntlCalendar object.
- $other: This parameter holds the another calendar against which the comparison is to be perform.
Return Value: This function returns TRUE if calendars are equivalent except possibly for their set time and return an error if the value of the parameter is not set.
Below program illustrates the IntlCalendar::isEquivalentTo() function in PHP:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.