ruby date get year month day hour minute second code example Example: time method in Ruby time method in ruby