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
- #inspect ⇒ Object
- #next_second(n = 1) ⇒ Object
- #prev_second(n = 1) ⇒ Object
- #to_display ⇒ Object
- #zowify ⇒ Object
Class Method Details
.zow ⇒ Object
34 35 36 |
# File 'lib/dohutil/core_ext/datewithtime.rb', line 34 def self.zow now.zowify 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
42 43 44 |
# File 'lib/dohutil/core_ext/datewithtime.rb', line 42 def next_second(n = 1) self + n end |
#prev_second(n = 1) ⇒ Object
46 47 48 |
# File 'lib/dohutil/core_ext/datewithtime.rb', line 46 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 |
#zowify ⇒ Object
38 39 40 |
# File 'lib/dohutil/core_ext/datewithtime.rb', line 38 def zowify self.class.new(year, month, mday, hour, min, sec, 0) end |