Format time as: "%A %A %A!" and "%a %a %a!" : Time format « Time « Ruby






Format time as: "%A %A %A!" and "%a %a %a!"


t = Time.local(2006, 1, 1)
t.strftime("%A %A %A!")                     # => "Sunday Sunday Sunday!"
t.strftime("%a %a %a!")                     # => "Sun Sun Sun!"

 








Related examples in the same category

1.Format Time as rfc822
2.Format Time as httpdate
3.Time Formatting Directives
4.Format time as iso8601