Module: TimeHelper

Included in:
Time
Defined in:
lib/rubyhelper/timehelper.rb

Instance Method Summary collapse

Instance Method Details

#to_simple_date(sep = '/') ⇒ Object



6
7
8
9
# File 'lib/rubyhelper/timehelper.rb', line 6

def to_simple_date(sep='/')
  sep = sep.to_s.tr_s('%', '')
  self.strftime('%d' + sep + '%m' + sep + '%Y')
end

#to_simple_timeObject



11
12
13
# File 'lib/rubyhelper/timehelper.rb', line 11

def to_simple_time
  self.strftime('%R')
end