Sha256: 6dd61be94f00223b4661636166ca3b687f2614a15b64e20026b521bb63707c3e

Contents?: true

Size: 266 Bytes

Versions: 27

Compression:

Stored size: 266 Bytes

Contents

class Time
  def self.next_quarter
    now = Time.now
    now -= now.sec
    next_quarter = now + (15 - now.min % 15).minutes
  end
  
  def self.previous_quarter
    now = Time.now
    now -= now.sec
    previous_quarter = now - (now.min % 15).minutes
  end
  
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
backlog-0.37.1 lib/time_extras.rb
backlog-0.36.2 lib/time_extras.rb
backlog-0.21.3 lib/time_extras.rb
backlog-0.22.1 lib/time_extras.rb
backlog-0.22.0 lib/time_extras.rb
backlog-0.23.0 lib/time_extras.rb
backlog-0.23.1 lib/time_extras.rb
backlog-0.24.0 lib/time_extras.rb
backlog-0.25.0 lib/time_extras.rb
backlog-0.26.0 lib/time_extras.rb
backlog-0.28.0 lib/time_extras.rb
backlog-0.29.0 lib/time_extras.rb
backlog-0.31.0 lib/time_extras.rb
backlog-0.30.0 lib/time_extras.rb
backlog-0.32.0 lib/time_extras.rb
backlog-0.31.1 lib/time_extras.rb
backlog-0.33.0 lib/time_extras.rb
backlog-0.34.1 lib/time_extras.rb
backlog-0.33.1 lib/time_extras.rb
backlog-0.34.2 lib/time_extras.rb