class Numeric
Public Instance Methods
am()
click to toggle source
A convenience for writing: 3.am or 1130.am
# File lib/theampm.rb, line 6 def am Chronic.parse "#{self} am" end
pm()
click to toggle source
# File lib/theampm.rb, line 10 def pm Chronic.parse "#{self} pm" end
to_time()
click to toggle source
# File lib/theampm.rb, line 14 def to_time hour = self if hour < 12 || (hour >= 100 && hour < 1200) am else Chronic.parse hour.to_s end end