Sha256: ed9a859211c07d922c3c5029ba7691daada0a0397ce7fa38a31aeeba3661a56c

Contents?: true

Size: 201 Bytes

Versions: 2

Compression:

Stored size: 201 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

2 entries across 2 versions & 1 rubygems

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