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.13.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.12.1 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.12.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.11.1 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.11.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.10.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.9.2 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.9.1 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.9.0 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.8.3 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.8.2 lib/fe_core_ext/core_ext/time.rb
fe_core_ext-0.8.1 lib/fe_core_ext/core_ext/time.rb