Class: Time
- Defined in:
- lib/dohutil/to_display.rb,
lib/dohutil/core_ext/inspect.rb,
lib/dohutil/core_ext/datewithtime.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.zow ⇒ Object
34 35 36 37 |
# File 'lib/dohutil/core_ext/datewithtime.rb', line 34 def self.zow obj = now new(obj.year, obj.month, obj.mday, obj.hour, obj.min, obj.sec, 0) end |
Instance Method Details
#inspect ⇒ Object
20 21 22 |
# File 'lib/dohutil/core_ext/inspect.rb', line 20 def inspect "#<Time:#{strftime('%F %X %z')}>" end |
#next_second(n = 1) ⇒ Object
39 40 41 |
# File 'lib/dohutil/core_ext/datewithtime.rb', line 39 def next_second(n = 1) self + n end |
#prev_second(n = 1) ⇒ Object
43 44 45 |
# File 'lib/dohutil/core_ext/datewithtime.rb', line 43 def prev_second(n = 1) self - n end |
#to_display ⇒ Object
16 17 18 |
# File 'lib/dohutil/to_display.rb', line 16 def to_display strftime('%m/%d/%Y %I:%M%P') end |