@@ -63,12 +63,42 @@ PHP X.Y UPGRADE NOTES
63
63
- MessageFormatter::parse() and MessageFormat::format() (and their static
64
64
equivalents) now don't throw away better than second precision in the
65
65
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.
66
92
67
93
========================================
68
94
5. New Functions
69
95
========================================
70
96
71
97
- Intl:
98
+ - datefmt_get_calendar_object()
99
+ - datefmt_get_timezone()
100
+ - datefmt_set_timezone()
101
+ - datefmt_get_calendar_object()
72
102
- intlcal_create_instance()
73
103
- intlcal_get_keyword_values_for_locale()
74
104
- intlcal_get_now()
@@ -140,6 +170,10 @@ PHP X.Y UPGRADE NOTES
140
170
- intltz_get_error_code()
141
171
- intltz_get_error_message()
142
172
173
+ - IntlDateFormatter::getCalendarObject()
174
+ - IntlDateFormatter::getTimeZone()
175
+ - IntlDateFormatter::setTimeZone()
176
+
143
177
- SPL:
144
178
- SplFixedArray::__wakeup()
145
179
0 commit comments