Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
zuro
Experienced
Topic Author
Posts: 56
Joined: 24 Jan 2011, 12:04

Another format date in Blog

05 Jul 2015, 13:32

That possible change format date in Blog post ?
Attachments
blog date.JPG
blog date.JPG (15.28 KiB) Viewed 3376 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Another format date in Blog

06 Jul 2015, 14:39

zuro wrote:That possible change format date in Blog post ?
Currently no, but it should be ... I assume you want a more traditional date format?
 
User avatar
zuro
Experienced
Topic Author
Posts: 56
Joined: 24 Jan 2011, 12:04

Re: Another format date in Blog

06 Jul 2015, 15:46

Yes. Traditional format or polish name ( day- dzień , month - miesiąc etc.)
 
User avatar
zuro
Experienced
Topic Author
Posts: 56
Joined: 24 Jan 2011, 12:04

Re: Another format date in Blog

13 Apr 2016, 07:13

Any news with format date in Blog Post ?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Another format date in Blog

14 Apr 2016, 08:12

zuro wrote:Any news with format date in Blog Post ?
Sorry not yet ... need to plan it properly, especially if it will be combined with language/translation.

In the meantime, you can easily fix it. Open templates/partials/module.context.html, line 53:
Code
<h6 class=date><time itemprop=dateUpdated datetime='{{ date|date("c") }}'>{{ date|date("d F Y") }}</time></h6>
Change to:
Code
<h6 class=date><span itemprop=dateUpdated datetime='{{ date|date("c") }}'>{{ date|date("d F Y") }}</span></h6>
You can also change the date|date("d F Y") to decide how you want the date to display. See options here:
http://php.net/manual/en/function.date.php
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Another format date in Blog

16 Apr 2016, 14:38

Date format setting has been added to release X3 0.17.1:
https://forum.photo.gallery/viewtopic.p ... 66&start=0

Date format setting
We have added settings -> date format, which allows you to customize how all dates are formatted. You can find a good reference on how to create your custom date format here.
Image