Sha256: 177b79398dd13e270aae4a0ae3459019db4fef2504d2368fc96dc85f85995359

Contents?: true

Size: 292 Bytes

Versions: 15

Compression:

Stored size: 292 Bytes

Contents

require_relative "base"

module Administrate
  module Field
    class Date < Base
      def date
        I18n.localize(
          data.to_date,
          format: format,
        )
      end

      private

      def format
        options.fetch(:format, :default)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
administrate-0.20.1 lib/administrate/field/date.rb
administrate-0.20.0 lib/administrate/field/date.rb
administrate-0.19.0 lib/administrate/field/date.rb
administrate-0.18.0 lib/administrate/field/date.rb
administrate-0.17.0 lib/administrate/field/date.rb
administrate-0.16.0 lib/administrate/field/date.rb
administrate-0.15.0 lib/administrate/field/date.rb
administrate-0.14.0 lib/administrate/field/date.rb
viniBaxterDesk-22.0.0 lib/administrate/field/date.rb
viniBaxterDesk-0.21.0 lib/administrate/field/date.rb
viniBaxterDesk-0.20.0 lib/administrate/field/date.rb
viniBaxterDesk-0.14.0 lib/administrate/field/date.rb
viniBaxterDesk-0.13.2 lib/administrate/field/date.rb
viniBaxterDesk-0.13.1 lib/administrate/field/date.rb
administrate-0.13.0 lib/administrate/field/date.rb