Sha256: 0b417447f8e9b4b3a7c4cd283e10d90337e1d717c07bed95fca688f214b81142

Contents?: true

Size: 489 Bytes

Versions: 14

Compression:

Stored size: 489 Bytes

Contents

# encoding: utf-8

module Axiom
  module Types

    # Represents a date time type
    class Time < Object
      extend ValueComparable

      # The minimum and maximum seconds for Time on 32-bit systems
      MINIMUM_SECONDS = -2**31
      MAXIMUM_SECONDS =  2**31 - 1

      primitive       ::Time
      coercion_method :to_time

      minimum primitive.at(MINIMUM_SECONDS).utc
      maximum primitive.at(MAXIMUM_SECONDS).utc

    end # class Time
  end # module Types
end # module Axiom

Version data entries

14 entries across 12 versions & 4 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/axiom-types-0.1.1/lib/axiom/types/time.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/axiom-types-0.1.1/lib/axiom/types/time.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/axiom-types-0.1.1/lib/axiom/types/time.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/axiom-types-0.1.1/lib/axiom/types/time.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/axiom-types-0.1.1/lib/axiom/types/time.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/axiom-types-0.1.1/lib/axiom/types/time.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/axiom-types-0.1.1/lib/axiom/types/time.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/axiom-types-0.1.1/lib/axiom/types/time.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/axiom-types-0.1.1/lib/axiom/types/time.rb
axiom-types-0.1.1 lib/axiom/types/time.rb
axiom-types-0.1.0 lib/axiom/types/time.rb
axiom-types-0.0.5 lib/axiom/types/time.rb
axiom-types-0.0.4 lib/axiom/types/time.rb
axiom-types-0.0.3 lib/axiom/types/time.rb