Sha256: 8d10fd377513f07d0fb37c2dc10dac8b5c30e9c488c458ee52baf64631fd57e4

Contents?: true

Size: 249 Bytes

Versions: 2

Compression:

Stored size: 249 Bytes

Contents

module Workpattern
  
  module Utility
  
    def midnight_before(adate)
      return adate -(HOUR * adate.hour) - (MINUTE * adate.min)
    end
    
    def midnight_after(adate)
      return midnight_before(adate.next_day)
    end
    
  end
end  

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
workpattern-0.3.0 lib/workpattern/utility/base.rb
workpattern-0.2.0 lib/workpattern/utility/base.rb