Class: Time
- Inherits:
-
Object
- Object
- Time
- Defined in:
- lib/vault-tools/time.rb
Instance Method Summary collapse
Instance Method Details
#last_month ⇒ Object
2 3 4 |
# File 'lib/vault-tools/time.rb', line 2 def last_month (self.to_datetime << 1).to_time end |
#next_month ⇒ Object
6 7 8 |
# File 'lib/vault-tools/time.rb', line 6 def next_month (self.to_datetime >> 1).to_time end |
#tomorrow ⇒ Object
10 11 12 |
# File 'lib/vault-tools/time.rb', line 10 def tomorrow (self.to_datetime + 1).to_time end |
#yesterday ⇒ Object
14 15 16 |
# File 'lib/vault-tools/time.rb', line 14 def yesterday (self.to_datetime - 1).to_time end |