Created
April 19, 2023 18:59
-
-
Save heiglandreas/763ea6974f4355d12fcddc5f897de24a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Calendar buddhist | |
Calendar chinese | |
int(1) | |
int(1) | |
Calendar coptic | |
Calendar dangi | |
int(1) | |
int(1) | |
Calendar ethiopic | |
Calendar ethiopic-amete-alem | |
Calendar gregorian | |
Calendar hebrew | |
Calendar indian | |
int(0) | |
int(0) | |
Calendar islamic | |
Calendar islamic-civil | |
Calendar islamic-umalqura | |
Calendar islamic-tbla | |
Calendar iso8601 | |
Calendar japanese | |
Calendar persian | |
int(0) | |
int(0) | |
Calendar roc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Calendar buddhist | |
Calendar chinese | |
Calendar coptic | |
Calendar dangi | |
Calendar ethiopic | |
Calendar ethiopic-amete-alem | |
Calendar gregorian | |
Calendar hebrew | |
Calendar indian | |
Calendar islamic | |
Calendar islamic-civil | |
Calendar islamic-umalqura | |
Calendar islamic-tbla | |
Calendar iso8601 | |
Calendar japanese | |
Calendar persian | |
Calendar roc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// The implementation of the chinese calendar seems to be broken | |
// The months can not be set. | |
$calendars = [ | |
"buddhist", | |
"chinese", | |
"coptic", | |
"dangi", | |
"ethiopic", | |
"ethiopic-amete-alem", | |
"gregorian", | |
"hebrew", | |
"indian", | |
"islamic", | |
"islamic-civil", | |
"islamic-umalqura", | |
"islamic-tbla", | |
"iso8601", | |
"japanese", | |
"persian", | |
"roc", | |
]; | |
foreach ($calendars as $calendar) { | |
echo ' Calendar ' . $calendar . PHP_EOL; | |
$f = IntlCalendar::createInstance('UTC', '@calendar=' . $calendar); | |
$i = $f->get(IntlCalendar::FIELD_MONTH); | |
$f->set(IntlCalendar::FIELD_MONTH, 0); | |
if ($i == $f->get(IntlCalendar::FIELD_MONTH)) { | |
var_dump($i, $f->get(IntlCalendar::FIELD_MONTH)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment