Sha256: 1af3f55642280fb8971a61570c19c53dd72439fc96e3be43bf161cdafbfca2d7

Contents?: true

Size: 1.13 KB

Versions: 9

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:%SZ'.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

9 entries across 9 versions & 1 rubygems

Version Path
genesis_ruby-0.2.0 lib/genesis_ruby/api/constants/date_time_formats.rb
genesis_ruby-0.1.9 lib/genesis_ruby/api/constants/date_time_formats.rb
genesis_ruby-0.1.8 lib/genesis_ruby/api/constants/date_time_formats.rb
genesis_ruby-0.1.7 lib/genesis_ruby/api/constants/date_time_formats.rb
genesis_ruby-0.1.6 lib/genesis_ruby/api/constants/date_time_formats.rb
genesis_ruby-0.1.5 lib/genesis_ruby/api/constants/date_time_formats.rb
genesis_ruby-0.1.4 lib/genesis_ruby/api/constants/date_time_formats.rb
genesis_ruby-0.1.3 lib/genesis_ruby/api/constants/date_time_formats.rb
genesis_ruby-0.1.2 lib/genesis_ruby/api/constants/date_time_formats.rb