Sha256: c8cf641f05a5f12d838c1c38741f1a88dbc6cd7dc5c1d791c669bfe3eb3f6171

Contents?: true

Size: 193 Bytes

Versions: 2

Compression:

Stored size: 193 Bytes

Contents

module HumanAttributes
  module Formatters
    class Date < Base
      def apply(_instance, value)
        I18n.l(value.to_date, **options)
      rescue
        nil
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
human_attributes-1.1.0 lib/human_attributes/formatters/date.rb
human_attributes-1.0.0 lib/human_attributes/formatters/date.rb