Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Date format in .md files

Started by Muut Archive 11 years ago · 6 replies · 17763 views
11 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?

11 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

11 years ago

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

11 years ago

Ah I see now! Thank you that works perfectly.

11 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 1323 9 years ago
Archive · by Muut Archive, 9 years ago
2 920 9 years ago
Archive · by Muut Archive, 9 years ago
2 4048 9 years ago
Archive · by Muut Archive, 9 years ago
1 2924 9 years ago
Archive · by Muut Archive, 9 years ago
3 1106 9 years ago