CakeFest 2017 NYC, the Official CakePHP Conference


(PHP 5.5.0, PECL >= 3.0.0a1)

IntlCalendar::isEquivalentToWhether another calendar is equal but for a different time


Stile orientato agli oggetti

public bool IntlCalendar::isEquivalentTo ( IntlCalendar $other )

Stile procedurale

bool intlcal_is_equivalent_to ( IntlCalendar $cal , IntlCalendar $other )

Returns whether this and the given object are equivalent for all purposes except as to the time they have set. The locales do not have to match, as long as no change in behavior results from such mismatch. This includes the timezone, whether the lenient mode is set, the repeated and skipped wall time settings, the days of the week when the weekend starts and ceases and the times where such transitions occur. It may also include other calendar specific settings, such as the Gregorian/Julian transition instant.

Elenco dei parametri


The IntlCalendar resource.


The other calendar against which the comparison is to be made.

Valori restituiti

Assuming there are no argument errors, returns TRUE iif the calendars are equivalent except possibly for their set time.


Example #1 IntlCalendar::isEquivalentTo()

$cal2 IntlCalendar::createInstance('Europe/Lisbon''es_ES');

var_dump($cal1->isEquivalentTo($cal2)); // true

$cal3 IntlCalendar::createInstance('Europe/Lisbon''en_US');
var_dump($cal1->isEquivalentTo($cal3)); // false
var_dump($cal1->getFirstDayOfWeek(),    // 2 (Monday)
$cal3->getFirstDayOfWeek());            // 1 (Sunday)

Il precedente esempio visualizzerĂ :


Vedere anche:

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top