sebastiangreger / kirby3-commentions

A versatile comment system and integrated Webmention endpoint for Kirby 3.
MIT License
58 stars 7 forks source link

Date formatting does not work with `intl` date handler #140

Closed fabianmichael closed 2 years ago

fabianmichael commented 2 years ago

The current date formatter only works with the date and the deprecated strftime date handlers, but not the newer intl option. https://getkirby.com/docs/reference/system/options/date

https://github.com/sebastiangreger/kirby3-commentions/blob/main/lib/Commention.php#L192-L202

@sebastiangreger Is support for PHP 7.4 still a thing for this plugin? Otherwise, we could rewrite this part using PHP 8’s match() here.

sebastiangreger commented 2 years ago

Would my minimalist PR fix the issue? (Sorry, no capacity for proper testing right now…)

I would rather not introduce a breaking change re backward compatibility to PHP 7.4 for such a minor bug?!