Created
February 25, 2015 21:23
-
-
Save HendrikPetertje/3921c07e45e6ae3190e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Search strftime on google to find time formats and default day month etc annotation | |
en: | |
# (or sv: whatever) | |
time: | |
formats: | |
short: "%A %e %B" | |
time: "%H:%M" | |
default: "%d/%m/%Y %H:%M" | |
small: '%a %d %B' | |
date: | |
day_names: [Zondag, Maandag, Dinsdag, Woensdag, Donderdag, Vrijdag, Zaterdag] | |
month_names: [~, januari, februari, maart, april, mei, juni, juli, augustus, september, oktober, november, december] | |
defaullt: "%d/%m/%Y %H:%M" | |
abbr_day_names: [Zo, Ma, Di, Wo, Do, Vr, Za] | |
Then in your views do: | |
<%= = l @article.date, format: :short # Where :short matches the time format you want |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment