Mega Code Archive

 
Categories / Ruby / Time
 

Time gm(2006) strftime(The year is %Y!)

puts Time.gm(2006).strftime('The year is %Y!')   # => "The year is 2006!"