Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/wackamole/core_ext/time.rb

Instance Method Summary collapse

Instance Method Details

#to_date_idObject



2
3
4
# File 'lib/wackamole/core_ext/time.rb', line 2

def to_date_id
  self.strftime( "%Y%m%d").to_i
end

#to_time_idObject



6
7
8
# File 'lib/wackamole/core_ext/time.rb', line 6

def to_time_id
  "%02d%02d%02d" % [self.hour, self.min, self.sec]
end