Sign in through GitHub
watch on iTunes
follow on Twitter
follow on Facebook
subscribe to RSS feed
Browse Episodes
RailsCasts Pro
Notifications
About
Feedback
#31
Formatting Time
May 14, 2007 | 5 minutes |
Active Support
,
Views
Learn how to use the trusty strftime method to format a time, and see how Rails allows you to save this format for later use.
Click to Play Video ▶
Tweet
Download:
mp4
Full Size H.264 Video (8.96 MB)
m4v
Smaller H.264 Video (5.69 MB)
webm
Full Size VP8 Video (18.5 MB)
ogv
Full Size Theora Video (12.1 MB)
Show Notes
ASCIIcast
20 Comments
Similar Episodes
Next Episode >
< Previous Episode
config/environment.rb
Time
::
DATE_FORMATS
[
:due_time
] =
"
due on %B %d at %I:%M %p
"
rhtml
<%=
task.due_at.to_s(
:due_time
)
%>