for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* CODE GENERATED; DO NOT EDIT.
*
* {@see \ICanBoogie\CLDR\Generator\Command\GenerateCalendarPreferenceData}
*/
namespace ICanBoogie\CLDR\Supplemental;
* @codeCoverageIgnore
final class CalendarPreferenceData
{
* @link https://github.com/unicode-org/cldr-json/blob/47.0.0/cldr-json/cldr-core/availableLocales.json
public const BY_REGION =
[
'001' => [
'gregorian',
],
'AE' => [
'islamic-umalqura',
'islamic',
'islamic-civil',
'islamic-tbla',
'AF' => [
'persian',
'AL' => [
'AZ' => [
'BD' => [
'BH' => [
'CN' => [
'chinese',
'CX' => [
'DJ' => [
'DZ' => [
'EG' => [
'coptic',
'EH' => [
'ER' => [
'ET' => [
'ethiopic',
'HK' => [
'ID' => [
'IL' => [
'hebrew',
'IN' => [
'indian',
'IQ' => [
'IR' => [
'JO' => [
'JP' => [
'japanese',
'KM' => [
'KR' => [
'dangi',
'KW' => [
'LB' => [
'LY' => [
'MA' => [
'MO' => [
'MR' => [
'MV' => [
'MY' => [
'NE' => [
'OM' => [
'PK' => [
'PS' => [
'QA' => [
'SA' => [
'islamic-rgsa',
'SD' => [
'SG' => [
'SY' => [
'TD' => [
'TH' => [
'buddhist',
'TJ' => [
'TM' => [
'TN' => [
'TR' => [
'TW' => [
'roc',
'UZ' => [
'XK' => [
'YE' => [
];
* Returns the preference calendar for a region.
public static function preferred_calendar_for_region(string $region): string
$preference = self::BY_REGION[$region] ?? self::BY_REGION['001'];
return current($preference);
}