The date of a blog entry I give
With
<? = $ Page-> date ('d. F Y')?>
I’ll get the date of a blog post in the german format DD. Month YYYY.
How do I get the German spelling of the months?
The date of a blog entry I give
With
<? = $ Page-> date ('d. F Y')?>
I’ll get the date of a blog post in the german format DD. Month YYYY.
How do I get the German spelling of the months?
I used http://php.net/manual/de/intldateformatter.format.php for this.
date.handler
to strftime.d. F Y
Also see this post: Textual representation of dates in multilang setup
I use this code in my template(s):
<?php setlocale(LC_TIME, "de_DE.utf8"); snippet('header') ?>
...
<?= strftime( "%d. %B %Y", strtotime(date("Y-m-d", $page->date())) ) ?>
This gives me: