Module: Timer
Instance Method Summary collapse
Instance Method Details
#last_mon ⇒ Object
7 8 9 10 |
# File 'lib/timer.rb', line 7 def last_mon mon = Time.at(now - (Time.at(now).wday - 1) * 24 * 60 * 60) Time.new(mon.year, mon.month, mon.day).to_i end |
#now ⇒ Object
3 4 5 |
# File 'lib/timer.rb', line 3 def now time = ENV['POTAM'] == 'test' ? ENV['POTAMTIME'].to_i : Time.now.to_i end |