Skip to content

Commit ba89ac1

Browse files
committed
Add some american and asian timezones
1 parent 205184c commit ba89ac1

File tree

4 files changed

+83
-1
lines changed

4 files changed

+83
-1
lines changed

src/Constants/CountryAll.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,24 @@ class CountryAll
3333
* America
3434
*/
3535
CountryAmerica::COUNTRY_CODE_AR => CountryAmerica::COUNTRY_NAME_AR,
36+
CountryAmerica::COUNTRY_CODE_BS => CountryAmerica::COUNTRY_NAME_BS,
3637
CountryAmerica::COUNTRY_CODE_CA => CountryAmerica::COUNTRY_NAME_CA,
38+
CountryAmerica::COUNTRY_CODE_CL => CountryAmerica::COUNTRY_NAME_CL,
39+
CountryAmerica::COUNTRY_CODE_CO => CountryAmerica::COUNTRY_NAME_CO,
40+
CountryAmerica::COUNTRY_CODE_MX => CountryAmerica::COUNTRY_NAME_MX,
41+
CountryAmerica::COUNTRY_CODE_PR => CountryAmerica::COUNTRY_NAME_PR,
3742
CountryAmerica::COUNTRY_CODE_US => CountryAmerica::COUNTRY_NAME_US,
43+
CountryAmerica::COUNTRY_CODE_VI => CountryAmerica::COUNTRY_NAME_VI,
3844

3945
/*
4046
* Asia
4147
*/
4248
CountryAsia::COUNTRY_CODE_AE => CountryAsia::COUNTRY_NAME_AE,
4349
CountryAsia::COUNTRY_CODE_CY => CountryAsia::COUNTRY_NAME_CY,
4450
CountryAsia::COUNTRY_CODE_IN => CountryAsia::COUNTRY_NAME_IN,
51+
CountryAsia::COUNTRY_CODE_IL => CountryAsia::COUNTRY_NAME_IL,
52+
CountryAsia::COUNTRY_CODE_KG => CountryAsia::COUNTRY_NAME_KG,
53+
CountryAsia::COUNTRY_CODE_NP => CountryAsia::COUNTRY_NAME_NP,
4554
CountryAsia::COUNTRY_CODE_KZ => CountryAsia::COUNTRY_NAME_KZ,
4655
CountryAsia::COUNTRY_CODE_RU => CountryAsia::COUNTRY_NAME_RU,
4756

src/Constants/CountryAmerica.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@ class CountryAmerica
2626
* Codes America
2727
*/
2828
public const COUNTRY_CODE_AR = 'AR';
29+
public const COUNTRY_CODE_BS = 'BS';
2930
public const COUNTRY_CODE_CA = 'CA';
31+
public const COUNTRY_CODE_CL = 'CL';
32+
public const COUNTRY_CODE_CO = 'CO';
33+
public const COUNTRY_CODE_MX = 'MX';
34+
public const COUNTRY_CODE_PR = 'PR';
3035
public const COUNTRY_CODE_US = 'US';
36+
public const COUNTRY_CODE_VI = 'VI';
3137

3238
/*
3339
* Countries America
@@ -40,8 +46,32 @@ class CountryAmerica
4046
Locale::DE_DE => 'Canada',
4147
Locale::EN_GB => 'Canada',
4248
];
49+
public const COUNTRY_NAME_CL = [
50+
Locale::DE_DE => 'Chile',
51+
Locale::EN_GB => 'Chile',
52+
];
53+
public const COUNTRY_NAME_CO = [
54+
Locale::DE_DE => 'Kolumbien',
55+
Locale::EN_GB => 'Colombia',
56+
];
57+
public const COUNTRY_NAME_BS = [
58+
Locale::DE_DE => 'Bahamas',
59+
Locale::EN_GB => 'The Bahamas',
60+
];
61+
public const COUNTRY_NAME_MX = [
62+
Locale::DE_DE => 'Mexico',
63+
Locale::EN_GB => 'Mexico',
64+
];
65+
public const COUNTRY_NAME_PR = [
66+
Locale::DE_DE => 'Puerto Rico',
67+
Locale::EN_GB => 'Puerto Rico',
68+
];
4369
public const COUNTRY_NAME_US = [
4470
Locale::DE_DE => 'Vereinigte Staaten',
4571
Locale::EN_GB => 'United States',
4672
];
73+
public const COUNTRY_NAME_VI = [
74+
Locale::DE_DE => 'Amerikanische Jungferninseln',
75+
Locale::EN_GB => 'United States Virgin Islands',
76+
];
4777
}

src/Constants/CountryAsia.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ class CountryAsia
2828
public const COUNTRY_CODE_AE = 'AE';
2929

3030
public const COUNTRY_CODE_CY = 'CY';
31+
public const COUNTRY_CODE_IL = 'IL';
3132
public const COUNTRY_CODE_IN = 'IN';
33+
public const COUNTRY_CODE_KG = 'KG';
34+
public const COUNTRY_CODE_NP = 'NP';
3235
public const COUNTRY_CODE_KZ = 'KZ';
3336
public const COUNTRY_CODE_RU = 'RU';
3437

@@ -43,10 +46,22 @@ class CountryAsia
4346
Locale::DE_DE => 'Republik Zypern',
4447
Locale::EN_GB => 'Cyprus',
4548
];
49+
public const COUNTRY_NAME_IL = [
50+
Locale::DE_DE => 'Israel',
51+
Locale::EN_GB => 'Israel',
52+
];
4653
public const COUNTRY_NAME_IN = [
4754
Locale::DE_DE => 'Indien',
4855
Locale::EN_GB => 'India',
4956
];
57+
public const COUNTRY_NAME_KG = [
58+
Locale::DE_DE => 'Kirgisistan',
59+
Locale::EN_GB => 'Kyrgyzstan',
60+
];
61+
public const COUNTRY_NAME_NP = [
62+
Locale::DE_DE => 'Nepal',
63+
Locale::EN_GB => 'Nepal',
64+
];
5065
public const COUNTRY_NAME_KZ = [
5166
Locale::DE_DE => 'Kasachstan',
5267
Locale::EN_GB => 'Kazakhstan',

tests/Unit/TimezoneTest.php

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,44 @@ public function dataProvider(): array
8989
[++$number, 'getCountryName', null, 'Africa/Accra', CountryAfrica::COUNTRY_NAME_GH[Locale::EN_GB]],
9090

9191
/**
92-
* getCountry/getCountryName: Africa
92+
* getCountry/getCountryName: America
9393
*/
9494
[++$number, 'getCountryCode', null, 'America/Argentina/Tucuman', CountryAmerica::COUNTRY_CODE_AR],
9595
[++$number, 'getCountryName', null, 'America/Argentina/Tucuman', CountryAmerica::COUNTRY_NAME_AR[Locale::EN_GB]],
96+
[++$number, 'getCountryCode', null, 'America/Bogota', CountryAmerica::COUNTRY_CODE_CO],
97+
[++$number, 'getCountryName', null, 'America/Bogota', CountryAmerica::COUNTRY_NAME_CO[Locale::EN_GB]],
98+
[++$number, 'getCountryCode', null, 'America/Chihuahua', CountryAmerica::COUNTRY_CODE_MX],
99+
[++$number, 'getCountryName', null, 'America/Chihuahua', CountryAmerica::COUNTRY_NAME_MX[Locale::EN_GB]],
100+
[++$number, 'getCountryCode', null, 'America/Hermosillo', CountryAmerica::COUNTRY_CODE_MX],
101+
[++$number, 'getCountryName', null, 'America/Hermosillo', CountryAmerica::COUNTRY_NAME_MX[Locale::EN_GB]],
102+
[++$number, 'getCountryCode', null, 'America/Matamoros', CountryAmerica::COUNTRY_CODE_MX],
103+
[++$number, 'getCountryName', null, 'America/Matamoros', CountryAmerica::COUNTRY_NAME_MX[Locale::EN_GB]],
104+
[++$number, 'getCountryCode', null, 'America/Monterrey', CountryAmerica::COUNTRY_CODE_MX],
105+
[++$number, 'getCountryName', null, 'America/Monterrey', CountryAmerica::COUNTRY_NAME_MX[Locale::EN_GB]],
106+
[++$number, 'getCountryCode', null, 'America/Nassau', CountryAmerica::COUNTRY_CODE_BS],
107+
[++$number, 'getCountryName', null, 'America/Nassau', CountryAmerica::COUNTRY_NAME_BS[Locale::EN_GB]],
108+
[++$number, 'getCountryCode', null, 'America/Ojinaga', CountryAmerica::COUNTRY_CODE_MX],
109+
[++$number, 'getCountryName', null, 'America/Ojinaga', CountryAmerica::COUNTRY_NAME_MX[Locale::EN_GB]],
110+
[++$number, 'getCountryCode', null, 'America/Puerto_Rico', CountryAmerica::COUNTRY_CODE_PR],
111+
[++$number, 'getCountryName', null, 'America/Puerto_Rico', CountryAmerica::COUNTRY_NAME_PR[Locale::EN_GB]],
112+
[++$number, 'getCountryCode', null, 'America/St_Thomas', CountryAmerica::COUNTRY_CODE_VI],
113+
[++$number, 'getCountryName', null, 'America/St_Thomas', CountryAmerica::COUNTRY_NAME_VI[Locale::EN_GB]],
114+
[++$number, 'getCountryCode', null, 'America/Tijuana', CountryAmerica::COUNTRY_CODE_MX],
115+
[++$number, 'getCountryName', null, 'America/Tijuana', CountryAmerica::COUNTRY_NAME_MX[Locale::EN_GB]],
96116

97117
/**
98118
* getCountry/getCountryName: Asia
99119
*/
100120
[++$number, 'getCountryCode', null, 'Asia/Almaty', CountryAsia::COUNTRY_CODE_KZ],
101121
[++$number, 'getCountryName', null, 'Asia/Almaty', CountryAsia::COUNTRY_NAME_KZ[Locale::EN_GB]],
122+
[++$number, 'getCountryCode', null, 'Asia/Bishkek', CountryAsia::COUNTRY_CODE_KG],
123+
[++$number, 'getCountryName', null, 'Asia/Bishkek', CountryAsia::COUNTRY_NAME_KG[Locale::EN_GB]],
102124
[++$number, 'getCountryCode', null, 'Asia/Dubai', CountryAsia::COUNTRY_CODE_AE],
103125
[++$number, 'getCountryName', null, 'Asia/Dubai', CountryAsia::COUNTRY_NAME_AE[Locale::EN_GB]],
126+
[++$number, 'getCountryCode', null, 'Asia/Jerusalem', CountryAsia::COUNTRY_CODE_IL],
127+
[++$number, 'getCountryName', null, 'Asia/Jerusalem', CountryAsia::COUNTRY_NAME_IL[Locale::EN_GB]],
128+
[++$number, 'getCountryCode', null, 'Asia/Kathmandu', CountryAsia::COUNTRY_CODE_NP],
129+
[++$number, 'getCountryName', null, 'Asia/Kathmandu', CountryAsia::COUNTRY_NAME_NP[Locale::EN_GB]],
104130
[++$number, 'getCountryCode', null, 'Asia/Nicosia', CountryAsia::COUNTRY_CODE_CY],
105131
[++$number, 'getCountryName', null, 'Asia/Nicosia', CountryAsia::COUNTRY_NAME_CY[Locale::EN_GB]],
106132

@@ -175,6 +201,8 @@ public function dataProvider(): array
175201
/**
176202
* getCountry/getCountryName: Pacific
177203
*/
204+
[++$number, 'getCountryCode', null, 'Pacific/Easter', CountryAmerica::COUNTRY_CODE_CL],
205+
[++$number, 'getCountryName', null, 'Pacific/Easter', CountryAmerica::COUNTRY_NAME_CL[Locale::EN_GB]],
178206
[++$number, 'getCountryCode', null, 'Pacific/Marquesas', CountryPacific::COUNTRY_CODE_PF],
179207
[++$number, 'getCountryName', null, 'Pacific/Marquesas', CountryPacific::COUNTRY_NAME_PF[Locale::EN_GB]],
180208
[++$number, 'getCountryCode', null, 'Pacific/Port_Moresby', CountryPacific::COUNTRY_CODE_PG],

0 commit comments

Comments
 (0)