Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Date format in .md files

Started by Muut Archive 12 years ago · 6 replies · 18993 views
12 years ago

Is there a way I can specify UK dates in the format dd/MM/YYYY in my post.md files and have Grav detect this correctly? I can get the dates to render in the correct format, but they seem to have to be formatted in US format in the markdown files.

At the moment I have to write:

YAML
title: "My post title"
date: 08/16/2014

I would like to be able to write:

YAML
title: "My post title"
date: 16/08/2014

I'm currently using the Mediator skeleton. Is there a file I can change to get this to work?

12 years ago

If I just use the format dd/mm/yyyy in the markdown files, then 01/08/2014 is interpreted as 8th Jan 2014 instead of 1st Aug 2014

12 years ago

Yes / is used for US dates and - for Euro dates. Try the dash approach I posted above.

12 years ago

Ah I see now! Thank you that works perfectly.

12 years ago

Cool, i've made a note to add this info to the docs for next time!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2612 9 years ago
Archive · by Muut Archive, 9 years ago
2 1721 9 years ago
Archive · by Muut Archive, 9 years ago
2 5016 9 years ago
Archive · by Muut Archive, 9 years ago
1 3846 9 years ago
Archive · by Muut Archive, 9 years ago
3 1823 9 years ago