Flowdock
method

previous_period_end

Importance_0
v2_2_9 - Show latest stable - 0 notes - Class: Period
previous_period_end(now, shift_age) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/logger.rb, line 552
    def previous_period_end(now, shift_age)
      case shift_age
      when /^daily$/
        t = Time.mktime(now.year, now.month, now.mday) - SiD / 2
      when /^weekly$/
        t = Time.mktime(now.year, now.month, now.mday) - (SiD * (now.wday + 1) + SiD / 2)
      when /^monthly$/
        t = Time.mktime(now.year, now.month, 1) - SiD / 2
      else
        return now
      end
      Time.mktime(t.year, t.month, t.mday, 23, 59, 59)
    end
Register or log in to add new notes.