Closed parkr closed 10 years ago
I'm in favor of option 1; I'll set about implementing it. Reason being that maybe you want a different date formats in different parts of the page for some reason.
Also can't we just pass the format directly through the tag? Like {% last_modified_at %b-%d-%Y %}
.
Yeah, you can throw the format in as an argument. So it returns the time object if there's no format, or a formatted string if there is?
I noticed that the date is displayed only as
%d-%b-%y
, and there's no way to customize it. I think it'd be useful for it to be customizable. Here are the three approaches I think might be wise:Time
object, and users can pass them to thedate
filter and customize the output_config.yml
that is then used to parse theTime
object into a string. Would apply to all output, so they'd have to really like this display.nil
, then we returnTime
otherwise, we render it as aString
Thoughts?