Ruby on Rails Sunday, June 29, 2014

On 29 June 2014 14:27, Fresh Mix <lists@ruby-forum.com> wrote:
> if @post.updated_at.strftime("%d-%m-%Y") !=
> Time.now.strftime("%d-%m-%Y")
>
> Or is there better way?

Those give you the dates in UTC, which may not be the same as the
local timezone date.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvG9M2qGqMKVX2mrwKv8e0tFQ2-5Q6qhqhXHXjbX5w6Og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment