Replies: 4 comments 2 replies
-
sorry, just reviewed the code and see that it uses date() when formatter is auto and % characters are not used. |
Beta Was this translation helpful? Give feedback.
-
After further review, while date() is supported, it requires using the parameters that date() expects. This leaves any existing code that utilizes %x modifiers in the date_format string as deprecated. Does it make sense to add a wrapper to map the strftime() modifiers to date() modifiers? Additionally, the html_select_date plugin also currently uses strftime() and thus throws deprecated errors in php 8.1 |
Beta Was this translation helpful? Give feedback.
-
Here is an incomplete shim for date() which maps accepted parameters from stftime(). I'm not sure if this is the right direction to take since some of the format strings don't map exactly to date() parameters. Welcome feedback and thoughts Relevant code:
|
Beta Was this translation helpful? Give feedback.
-
Hi @totalAldo! There is much discussion going on on this topic already: https://github.com/smarty-php/smarty/search?q=strftime&type=issues |
Beta Was this translation helpful? Give feedback.
-
Since date_format is a wrapper to strftime(), will this be updated for PHP8.1+ compatiblity?
Beta Was this translation helpful? Give feedback.
All reactions