Top Level Namespace

Defined Under Namespace

Modules: ActionController, CombinedTimeSelect

Instance Method Summary collapse

Instance Method Details

#ampm_hour(hour) ⇒ Object



103
104
105
# File 'lib/combined_time_select.rb', line 103

def ampm_hour(hour)
  return hour == 12 ? 12 : (hour == 0 ? 12 : (hour / 12 == 1 ? hour % 12 : hour))
end

#zero_pad_num(num) ⇒ Object



107
108
109
# File 'lib/combined_time_select.rb', line 107

def zero_pad_num(num)
  return num < 10 ? '0' + num.to_s : num.to_s
end