Sha256: 9e6dccf270f3eb1138eddc8448d33146cf866a4db9e9b21ff2f6ca707d644724

Contents?: true

Size: 199 Bytes

Versions: 8

Compression:

Stored size: 199 Bytes

Contents

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
human_attributes-0.7.1 lib/human_attributes/formatters/datetime.rb
human_attributes-0.7.0 lib/human_attributes/formatters/datetime.rb
human_attributes-0.6.0 lib/human_attributes/formatters/datetime.rb
human_attributes-0.5.0 lib/human_attributes/formatters/datetime.rb
human_attributes-0.4.0 lib/human_attributes/formatters/datetime.rb
human_attributes-0.3.1 lib/human_attributes/formatters/datetime.rb
human_attributes-0.3.0 lib/human_attributes/formatters/datetime.rb
human_attributes-0.2.0 lib/human_attributes/formatters/datetime.rb