What's happening with the strftime() and date() output modifiers?

Same here. I was astounded to find that the DateTime class was limited to English output, especially considering all the other bells and whistles it has.

I found this encouraging note at Dreamhost:

The intl extension is enabled by default on PHP versions above 7.2

I imagine by PHP 9, it will be universally installed and enabled.

How about a :dateFormat filter that uses date() and an :intlDateFormat filter that uses the DateTime class?

And how about putting the strtotime() conversion inside the filter if the input is identified as a timestamp, so the user doesn’t have to chain two output modifiers?

Also, how about an extra containing a snippet called something like MyDate that could make the existing :date and :strftime filters work without strftime() so users could just change the filter name in the tags (assuming that such a snippet is possible)?

1 Like