1# CHANGELOG
2
3### 3.5.1 (2020-01-24)
4
5* Fix sorting strings that start with a digit (#169, @mlocati)
6
7
8### 3.5.0 (2019-12-02)
9
10* CLDR data upgraded from 35.1 to 36 (#168, @mlocati)
11* libphonenumber data upgraded from version 8.10.12 to version 8.10.22 (#168, @mlocati)
12
13
14### 3.4.0 (2019-05-22)
15
16* New function: `Punic\Unit::getPerFormat()` (#162, #163, @mlocati)
17 Example:
18 ```php
19 Punic\Unit::getPerFormat('minute', 'long`, 'en_US`)
20 ```
21 returns `'%1$s per minute'`
22* libphonenumber data upgraded from version 8.10.1 to version 8.10.12 (#164, @mlocati)
23* CLDR data updated from version 34 to version 35.1 (#164, @mlocati)
24 See http://cldr.unicode.org/index/downloads/cldr-35 for details
25 **NOTE** The plural rules for the Cornish (`kw`) language may have some issues: see https://unicode-org.atlassian.net/browse
26
27
28### 3.3.1 (2018-12-07)
29* Comparer no longer raises E_NOTICE warnings in case of problems (#161, @mlocati)
30
31
32### 3.3.0 (2018-11-23)
33* CLDR updated from 34 (#160, @mlocati, @c960657)
34 See http://cldr.unicode.org/index/downloads/cldr-34 for details
35* Since CLDR 34 no longer contains telephone data, Punic now uses the data from libphonenumber.
36* **BREAKING CHANGE** The two methds `Territory::getCode`/`Territory::getByCode` added in Punic 3.2.0 don't support the `internet` type anymore because CLDR removed the relevant data
37
38
39### 3.2.0 (2018-11-08)
40
41* CLDR updated from 32.0.1 to 33.1 (@mlocati)
42 See #148, #156
43* Draft status of CLDR data changed from *unconfirmed* to *contributed* (@mlocati)
44 See #156
45* Added possibility to overrides data (`Punic\Data::getOverrides`, `Punic\Data::setOverrides`, `Punic\Data::getOverridesGeneric`, `Punic\Data::setOverridesGeneric`) (@c960657)
46 See #136
47* Added `Punic\Number::formatPercent()` (@c960657)
48 See #144
49* Added `Punic\Number::formatCurrency()` (@c960657)
50 See #144
51* Added `Punic\Number::spellOut()` (@c960657, @mlocati)
52 See #147, #155
53* Allow using custom data directory (@c960657)
54 See #132
55* `Punic\Territory` *get* methods now support territory subdivisions (Provinces, Counties, ...) (@c960657, @mlocati)
56 See #133
57* Time zone aliases are now extracted from CLDR instead of hard coding them (@c960657)
58 See #134
59* Added `Punic\Currency::getNumericCode` and `Punic\Currency::getByNumericCode` (@c960657)
60 See #138
61* Added `Punic\Territory::getCode` and `Punic\Territory::getByCode` (@c960657)
62 See #138
63* Fix `[ALL]` languages placeholder in `punic-data` CLI command (@mlocati)
64 See #131
65* Fix handling of minutes/month in Calendar intervals (@c960657)
66 See #143
67* Support explicit timezone translations (@c960657)
68 See #140
69* Localise infinity and NaN (@c960657)
70 See #146
71* Minor performance improvements (@c960657)
72 See #145
73* `Punic\Plural::getRule` has been deprecated: use `Punic\Plural::getRuleOfType` (@mlocati)
74 See #151
75* **BREAKING CHANGE** `Punic\Territory::getChildTerritoryCodes()` changed its signature (a new argument with a default value has been added) (@c960657)
76 See #138
77
78
79### 3.1.0 (2018-02-09)
80
81* CLDR updated from 31 to 32.0.1 (@mlocati)
82* Added `Punic\Misc::joinAnd()` to join items in arrays or Traversables with an *and* (@c960657, @mlocati)
83* Added `Punic\Misc::joinOr()` to join items in arrays or Traversables with an *or* (@c960657)
84* `Punic\Misc::join()` has been deprecated (@c960657, @mlocati)
85* **BREAKING CHANGE** The Punic\Misc::joinInternal() protected method changed its signature (@c960657)
86
87
88### 3.0.1 (2018-02-01)
89
90* Add `bin/punic-data` CLI command to the package (@mlocati)
91
92
93### 3.0.0 (2018-02-01)
94
95* Added support for skeleton formats (@c960657)
96* Added support for date/time intervals (@c960657)
97* Added punic-data CLI command to add/remove language data files (@mlocati)
98* Added support for wide/narrow day period names (eg 'AM', 'PM') in `Calendar::formatDate()` (@c960657)
99* Added support for time zone location-specific names in calendar formats (@c960657)
100* Punic now accepts `DateTimeInterface` instances too (@c960657, @mlocati)
101* Fix handling of single quotes in `Calendar::format` (@c960657)
102* Fix handling of seconds fraction with more that 5 digits in `Calendar::format` (@c960657)
103* Fix formatting hours in short GMT format (@c960657)
104* Fix `Currency::getName()` when it receives the parameters 'zero', 'one', 'two', 'few', 'many', 'other' (@c960657)
105* **BREAKING CHANGE** Moved punic from the `code` to the `src` directory (@mlocati)
106* **BREAKING CHANGE** Data files are now in PHP format instead of JSON format (@c960657, @mlocati)
107* **BREAKING CHANGE** The `build` CLI command has been removed (use the new `punic-data` CLI command) (@mlocati)
108* **BREAKING CHANGE** The `bin/update-docs` CLI command has been removed (feature moved to the `punic-update-docs` CLI command in the `punic.github.io` repository) (@mlocati)
109* **BREAKING CHANGE** The protected `Calendar::decodeFranctionsOfSeconds()` method has been renamed to `Calendar::decodeFractionsOfSeconds()` (@Remo)
110* **BREAKING CHANGE** The protected `Calendar::decode...` methods changed their signature (removed the `DateTime` type hinting) (@c960657, @mlocati)
111
112
113### 2.1.0 (2017-03-23)
114
115* Added `Punic\Calendar::tryConvertIsoToPhpFormat` (@mlocati)
116
117
118### 2.0.0 (2017-03-22)
119
120* CLDR data updated from v27 to v31 (@mlocati)
121* Added `Punic\Unit::getAvailableUnits` (@mlocati)
122* Added `Punic\Unit::getName` (@mlocati)
123* **BREAKING CHANGE** `Punic\Language::getName` return compound names only if requested (@mlocati)
124
125
126### 1.6.5 (2017-02-03)
127
128* Fix edge case on old PHP versions without the intl PHP extension (see #89) (@mlocati)
129
130
131### 1.6.4 (2016-11-21)
132
133* Fix edge case when `Collator` is an alias of `Symfony\Component\Intl\Collator\Collator` (@mlocati)
134
135
136### 1.6.3 (2015-06-16)
137
138* Fix sorting of list with non-US-ASCII chars (@mlocati, @Remo)
139* Speed improvements (@mlocati)
140
141
142### 1.6.2 (2015-06-10)
143
144* Workaround for HHVM bug while handling timezone names (@mlocati)
145
146
147### 1.6.1 (2015-05-11)
148
149* Fix formatting ordinal suffix for the day of the month for English (@mlocati)
150
151
152### 1.6.0 (2015-05-11)
153
154* Fixed a bug in `Calendar::convertPhpToIsoFormat` (@mlocati)
155
156
157### 1.5.0 (2015-03-26)
158
159* Updated CLDR data to v27 (@mlocati)
160
161
162### 1.4.1 (2015-01-18)
163
164* Speed improvements (@LukasReschke)
165
166
167### 1.4.0 (2015-01-14)
168
169* Added functions to work with currencies (see `Punic\Currency`) (@mlocati)
170* Added `Punic\Territory::getChildTerritoryCodes` (@mlocati)
171* Added `Punic\Unit::getCountriesWithMeasurementSystem` (@mlocati)
172* Added `functions to work with default paper sizes` (@mlocati)
173* Detected browser languages are now sorted by relevance (see `Punic\Misc::getBrowserLocales()` and `Punic\Misc::parseHttpAcceptLanguage()`) (@mlocati)
174* We now have a separate `composer.json` file for the automatic checks done by GitHub/TravisCI (@mlocati)
175
176
177### 1.3.0 (2015-01-11)
178
179* Added `Punic\Phone::getPrefixesForTerritory` (@mlocati)
180* Added `Punic\Phone::getTerritoriesForPrefix` (@mlocati)
181* Added `Punic\Phone::getMaxPrefixLength` (@mlocati)
182* Added `Punic\Unit::getMeasurementSystems` (@mlocati)
183* Added `Punic\Unit::getMeasurementSystemFor` (@mlocati)
184* Added `Punic\Territory::getParentTerritoryCode` (supersedes deprecated protected `Punic\Data::getParentTerritory`) (@mlocati)
185
186
187### 1.2.3 (2014-12-19)
188
189* Added `Punic\Misc::getCharacterOrder` (@mlocati)
190* Added `Added Punic\Misc::getLineOrder` (@mlocati)
191
192
193### 1.2.2 (2014-12-12)
194
195* Added `Added Punic\Language::getAll` (@mlocati)
196
197
198### 1.2.1 (2014-12-11)
199
200* Added `Punic\Misc::getBrowserLocales` (@mlocati)
201* Added `Punic\Misc::parseHttpAcceptLanguage` (@mlocati)
202
203
204### 1.2.0 (2014-12-11)
205
206* Added `Punic\Territory::getTerritoriesWithInfo` (@mlocati)
207* Added `Punic\Territory::getLanguages` (@mlocati)
208* Added `Punic\Territory::getPopulation` (@mlocati)
209* Added `Punic\Territory::getLiteracyLevel` (@mlocati)
210* Added `Punic\Territory::getGrossDomesticProduct` (@mlocati)
211* Added `Punic\Territory::getTerritoriesForLanguage` (@mlocati)
212
213
214### 1.1.0 (2014-09-25)
215
216* Switch from CLDR 25 to CLDR 26 (@mlocati)
217
218
219### 1.0.2 (2014-09-05)
220
221* `Punic\Calendar::toDateTime()` improved: now it can also convert FROM a timezone (@mlocati)
222
223
224### 1.0.1 (2014-09-02)
225
226* Added `punic.php` for people not using composer: simply include it and use all the Punic functions (@mlocati, @Remo)
227
228
229### 1.0.0 (2014-09-01)
230
231* First public version (@mlocati, @Remo)
232