Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/date_time_extensions.rb

Instance Method Summary collapse

Instance Method Details

#time?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/date_time_extensions.rb', line 43

def time?
  return !(hour == 0 && min == 0 && sec == 0)
end

#to_standard_sObject



47
48
49
# File 'lib/date_time_extensions.rb', line 47

def to_standard_s
  return time? ? to_datetime.to_standard_s : to_date.to_standard_s
end