Sha256: a77b82f3449e450d0731d388db3f291229b01429ba934795f4269847d02abf88

Contents?: true

Size: 1.13 KB

Versions: 2

Compression:

Stored size: 1.13 KB

Contents

module GenesisRuby
  module Api
    module Constants
      # Date Time string representation formats
      class DateTimeFormats

        extend Mixins::Constants::Common

        # Little endian(day, month, year) system with hyphens in between
        DD_MM_YYYY_L_HYPHENS  = '%d-%m-%Y'.freeze

        # Little endian(day, month, year) system with dots in between
        DD_MM_YYYY_L_DOTS     = '%d.%m.%Y'.freeze

        # Little endian(day, month, year) system with dots in between
        DD_MM_YYYY_L_SLASHES  = '%d/%m/%Y'.freeze

        # Zulu timestamp
        YYYY_MM_DD_H_I_S_ZULU = '%Y-%m-%dT%H:%M:%S%z'.freeze

        # Modified Zulu timestamp
        YYYY_MM_DD_H_I_S      = '%Y-%m-%d %H:%M:%S'.freeze

        # Date Format ISO 8601
        YYYY_MM_DD_ISO_8601   = '%Y-%m-%d'.freeze

        class << self

          def all
            [
              DD_MM_YYYY_L_HYPHENS,
              DD_MM_YYYY_L_DOTS,
              DD_MM_YYYY_L_SLASHES,
              YYYY_MM_DD_H_I_S_ZULU,
              YYYY_MM_DD_H_I_S,
              YYYY_MM_DD_ISO_8601 # Always keep it last!!!
            ]
          end

        end

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
genesis_ruby-0.1.1 lib/genesis_ruby/api/constants/date_time_formats.rb
genesis_ruby-0.1.0 lib/genesis_ruby/api/constants/date_time_formats.rb