module HexaPDF::DictionaryFields::DateConverter

Converter module for handling PDF date fields since they are stored as strings.

The ISO PDF specification differs from Adobe's specification in respect to the supported date format. When converting from a date string to a Time object, this is taken into account.

See: PDF1.7 s7.9.4, ADB1.7 3.8.3

Public Class Methods

additional_types() click to toggle source

A date field may contain a string in PDF format, or a Time, Date or DateTime object.

# File lib/hexapdf/dictionary_fields.rb, line 285
def self.additional_types
  [String, Time, Date, DateTime]
end
usable_for?(type) click to toggle source

This converter is usable if the type is PDFDate.

# File lib/hexapdf/dictionary_fields.rb, line 280
def self.usable_for?(type)
  type == PDFDate
end