Format Time as rfc822 : Time format « Time « Ruby






Format Time as rfc822


require 'time'
mail_received = 'Tue, 1 Jul 2003 10:52:37 +0200'
puts Time.rfc822(mail_received)

 








Related examples in the same category

1.Format Time as httpdate
2.Time Formatting Directives
3.Format time as iso8601
4.Format time as: "%A %A %A!" and "%a %a %a!"