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

Dateformat shown as "... ago", how could I do it?

Started by Muut Archive 10 years ago · 7 replies · 373 views
10 years ago

Hello, I'm really new to grav and I'm not sure yet how to use the variables provided.
What I want to do is to show "1 min ago", "3 hours ago" , "7 days ago" instead of the long date. Is it possible somehow, can anyone help me?

10 years ago

oh, thank you so much!!! I feel stupid now >.<

10 years ago

do you by any chance know how to localize it?

10 years ago

I mean, is there a chance to override the translations provided by the system language settings? Because it translates into the wrong phase by default.

10 years ago

There is a default_localesetting in system.yaml, as well as a override_locale setting. In theory overriding this will allow PHP to translate common phrases, though I'm unsure of the linguistic coverage this offers, and haven't tested it myself.

10 years ago

Thanks a lot guys! I'm still learning grav, but its awesome! :)

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1362 9 years ago
Archive · by Muut Archive, 9 years ago
2 939 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2959 9 years ago
Archive · by Muut Archive, 9 years ago
3 1123 9 years ago