Skip to content

Commit c22a29b

Browse files
committed
Updated UPGRADING for the changes in eb346ef
1 parent 6efc877 commit c22a29b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

UPGRADING

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,42 @@ PHP X.Y UPGRADE NOTES
6363
- MessageFormatter::parse() and MessageFormat::format() (and their static
6464
equivalents) now don't throw away better than second precision in the
6565
arguments.
66+
- IntlDateFormatter::__construct and datefmt_create() now accept for the
67+
$timezone argument time zone identifiers, IntlTimeZone objects, DateTimeZone
68+
objects and NULL. It used to accept only time zone identifiers and NULL.
69+
Invalid time zone identifiers are no longer accepted. Emptry strings are
70+
no longer accepted.
71+
- The default time zone used in IntlDateFormatter::__construct and
72+
datefmt_create() (when the corresponding argument is not passed or NULL is
73+
passed) is now the one given by date_default_timezone_get(), not the
74+
default ICU time zone.
75+
- The time zone passed to the IntlDateFormatter is ignored if it is NULL and if
76+
the calendar passed is an IntlCalendar object -- in this case, the
77+
IntlCalendar's time zone will be used instead. Otherwise, the time zone
78+
specified in the $timezone argument is used instead. This does not affect
79+
old code, as IntlCalendar was introduced in this version.
80+
- IntlDateFormatter::__construct and datefmt_create() now accept for the
81+
$calendar argument also IntlCalendar objects.
82+
- IntlDateFormatter::getCalendar() and datefmt_get_calendar() return false
83+
if the IntlDateFormatter was set up with an IntlCalendar instead of the
84+
constants IntlDateFormatter::GREGORIAN/TRADITIONAL. IntlCalendar did not
85+
exist before this version.
86+
- IntlDateFormatter::setCalendar() and datefmt_set_calendar() now also accept
87+
an IntlCalendar object, in which case its time zone is taken. Passing a
88+
constant is still allowed, and still keeps the time zone.
89+
- IntlDateFormatter::setTimeZoneID() and datefmt_set_timezone_id() are
90+
deprecated. Use IntlDateFormatter::setTimeZone() or datefmt_set_timezone()
91+
instead.
6692

6793
========================================
6894
5. New Functions
6995
========================================
7096

7197
- Intl:
98+
- datefmt_get_calendar_object()
99+
- datefmt_get_timezone()
100+
- datefmt_set_timezone()
101+
- datefmt_get_calendar_object()
72102
- intlcal_create_instance()
73103
- intlcal_get_keyword_values_for_locale()
74104
- intlcal_get_now()
@@ -140,6 +170,10 @@ PHP X.Y UPGRADE NOTES
140170
- intltz_get_error_code()
141171
- intltz_get_error_message()
142172

173+
- IntlDateFormatter::getCalendarObject()
174+
- IntlDateFormatter::getTimeZone()
175+
- IntlDateFormatter::setTimeZone()
176+
143177
- SPL:
144178
- SplFixedArray::__wakeup()
145179

0 commit comments

Comments
 (0)