IntlCalendar::isEquivalentTo

(PHP 5 >= 5.5.0, PHP 7, PHP 8, PECL >= 3.0.0a1)

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

Beschreibung

Objektorientierter Stil

public IntlCalendar::isEquivalentTo(IntlCalendar $other): bool

Prozeduraler Stil

intlcal_is_equivalent_to(IntlCalendar $calendar, IntlCalendar $other): bool

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.

Parameter-Liste

calendar

Eine IntlCalendar-Instanz.

other

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

Rückgabewerte

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

Beispiele

Beispiel #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)

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

bool(true)
bool(false)
int(2)
int(1)

Siehe auch

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Grundlagen von Views in MySQL

Views in einer MySQL-Datenbank bieten die Möglichkeit, eine virtuelle Tabelle basierend auf dem Ergebnis einer SQL-Abfrage zu erstellen. ...

admin

Autor : admin
Kategorie: mySQL-Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Google reCAPTCHA in Kontaktformular einbinden

Hallo zusammen, vielen Dank für die Antworten Mein Beitrag sechs Jahre alt.Die Webseite existiert nicht einmal mehr. Ich freue mich aber, dass m ...

Geschrieben von BWAT am 21.02.2025 11:21:30
Forum: PHP Developer Forum
Google reCAPTCHA in Kontaktformular einbinden

Hallo, bei einer alten Webseite, die ich noch bis Ende des Jahres betreue, muss ich ein reCaptcha einbauen, damit der Hoster aufgrund von Spam die ...

Geschrieben von Olivia am 21.02.2025 11:13:40
Forum: PHP Developer Forum
mit json Btc adresse auslesen

No-Deposit-Boni bieten großartige Chancen, besonders für Anfänger, die das Casino ohne Risiko ausprobieren möchten. Es ist jedoch wichtig, die ...

Geschrieben von DannieDenesik am 20.02.2025 08:09:41
Forum: Apps und PHP Script Gesuche
How to overcome Safari's iframe cookie block?

A good way to bypass Safari’s iframe cookie block is to use Storage Access API. This allows embedded iframes to request access to cookies by pro ...

Geschrieben von mohrceleste am 20.02.2025 05:17:31
Forum: HTML, JavaScript, AJAX, jQuery, CSS, Bootstrap, LESS