Sha256: 313b1b5701a741f16d9ddcbc99c8f0eca29b12153bf84c51ad9e47dde4e68c22

Contents?: true

Size: 412 Bytes

Versions: 32

Compression:

Stored size: 412 Bytes

Contents

require 'active_support'
require 'active_support/time'

module FeCoreExt::CoreExt
end

module FeCoreExt::CoreExt::Time
  def floor(unit = :sec)
    case unit
    when :sec
      Time.zone.local(year, month, day, hour, min, sec)
    else
      self
    end
  end
end

module FeCoreExt::CoreExt::TimeClassMethods
end

class Time
  include FeCoreExt::CoreExt::Time
  extend FeCoreExt::CoreExt::TimeClassMethods
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
fe_core_ext-0.26.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.25.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.24.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.23.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.22.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.21.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.20.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.19.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.18.1 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.18.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.17.3 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.17.2 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.17.1 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.17.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.16.1 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.16.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.15.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.14.1 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.14.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.13.1 lib/fe_core_ext/core_ext/time.rb