Change timestamp format

Is there an easy way to change the timestamp that shows up on posts.
Right
now my typo site displays the time of a post as 6 days ago. It seems
that
older posts do show up as Tuesday, April 18, 2006, whch is the format
I’d
like it to always have, but I’d like to add the time. Same with
comments,
it say things like 15 days later, I’d rather it just say Friday, May 21,
2006 at 2:34 pm. Is this a function of typo or the theme?

It’s part of the theme.

Scott

On 7/12/06, Paul B. [email protected] wrote:

Is there an easy way to change the timestamp that shows up on posts.

I’m customizing Scribbish for a theme for my Typo blog. Here’s what I
did when I wanted the same thing you do:

In typo/themes/peekle/views/articles/_article.rhtml I changed this block

Posted by <%= author_link(article) %> <%= js_distance_of_time_in_words_to_now article.created_at %>

to read

Posted by <%= author_link(article) %> on <%= article.published_at %>

This results in the kind-of graceless but pretty geeky byline

Posted by R. N. Dominick on Tue Jul 11 11:07:00 EDT 2006

but I like it.

On 7/12/06, R. N. Dominick [email protected] wrote:

but I like it.

You can also use article.published_at.strftime to get better control
over the format. Run ‘ri strftime’ or ‘man strftime’ to see all of
the options.

Scott

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs