IntlCalendar::isEquivalentTo
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
IntlCalendar::isEquivalentTo
Референца за `intlcalendar.isequivalentto.php` со подобрена типографија и навигација.
IntlCalendar::isEquivalentTo
(PHP 5 >= 5.5.0, PHP 7, PHP 8, PECL >= 3.0.0a1)
IntlCalendar::isEquivalentTo — Whether another calendar is equal but for a different time
= NULL
Напиши целосна ознака на елемент
Процедурален стил
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 режим на толеранција is set, the repeated and skipped wall time settings, the days of the week when the weekend starts and ceases Пример #4 Споредување на вратената вредност на include times where such transitions occur. It may also include other calendar specific settings, such as the Gregorian/Julian transition instant.
Параметри
calendar-
Еден IntlCalendar instance.
other-
The other calendar against which the comparison is to be made.
Вратени вредности
Под претпоставка дека нема грешки во аргументите, враќа true if the calendars are equivalent except possibly for their set time.
Примери
Пример #1 IntlCalendar::isEquivalentTo()
<?php
$cal1 = IntlCalendar::createInstance('Europe/Lisbon', 'pt_PT');
$cal2 = IntlCalendar::createInstance('Europe/Lisbon', 'es_ES');
$cal2->clear();
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)Пример #1 Пример што покажува затворачка ознака што го опфаќа последниот нов ред
bool(true) bool(false) int(2) int(1)