ext/intl: Delete outdated TODO message to support numeric-castable objects as date/time values in IntlDateFormatter->format()#21959
Conversation
IntlDateFormatter::formatObject()IntlDateFormatter->format()
| rv = U_MILLIS_PER_SECOND * (double)Z_LVAL(casted); | ||
| } else if (Z_TYPE(casted) == IS_DOUBLE) { | ||
| rv = U_MILLIS_PER_SECOND * Z_DVAL(casted); | ||
| } else { |
There was a problem hiding this comment.
you need to gate it with !EG(exception)
There was a problem hiding this comment.
Ah yeah good catch :) Please check it again and see if now its right enough.
Girgias
left a comment
There was a problem hiding this comment.
I'm not sure that we should do this. This would differ from the usual semantics of string|int|float|IntlCalendar|DateTimeInterface type if done in userland, especially as we already don't handle stringable objects.
That make sense, I don't have strong opinions on this point since I am submitting this patch as an implementation to the TODO message. Maybe the code owner can decide it. |
|
I planned to have a better look at this this weekend, Gina's comment makes sense ; making me reconsider my initial judgement ... we ll see. |
Ah no need to rush this :) I am investigating why we are writing this todo message initially. Will post here. |
|
I would say people initially write this in the very beginning of this file history 2416719 when the usual semantics of string|int|float|IntlCalendar|DateTimeInterface is yet being constructed. So I will consider this as a outdated TODO comment. I would prefer to delete the comment and remain as-is for the rest of the code base. |
I think it s preferable indeed. |
|
Done. I forget to add [fix CI] >_< |
IntlDateFormatter->format()IntlDateFormatter->format()
|
once done, would you mind ?
Thanks. |
b62e43d to
768ae95
Compare
Allow
IntlDateFormatter->format()to accept objects that support numeric casting, in addition toIntlCalendarandDateTimeInterfaceas per the TODO message.