Sha256: 68498dceaab8ba8fdefbbe25b6af0b45919b8f9ffdaa37dfdb1c10019185382f

Contents?: true

Size: 534 Bytes

Versions: 126

Compression:

Stored size: 534 Bytes

Contents

# encoding: utf-8
module Mail
  class DateTimeElement # :nodoc:
    
    include Mail::Utilities
    
    def initialize( string )
      parser = Mail::DateTimeParser.new
      if tree = parser.parse(string)
        @date_string = tree.date.text_value
        @time_string = tree.time.text_value
      else
        raise Mail::Field::ParseError.new(DateTimeElement, string, parser.failure_reason)
      end
    end
    
    def date_string
      @date_string
    end
    
    def time_string
      @time_string
    end
    
  end
end

Version data entries

126 entries across 114 versions & 13 rubygems

Version Path
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
initforthe-cookies-0.0.1 vendor/bundle/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
classiccms-0.3.8 vendor/bundle/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
challah-0.6.1 vendor/bundle/gems/mail-2.4.1/lib/mail/elements/date_time_element.rb
challah-0.6.1 vendor/bundle/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
classiccms-0.3.7 vendor/bundle/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
classiccms-0.3.6 vendor/bundle/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
classiccms-0.3.5 vendor/bundle/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
classiccms-0.3.4 vendor/bundle/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
classiccms-0.3.3 vendor/bundle/gems/mail-2.4.4/lib/mail/elements/date_time_element.rb
otherinbox-mail-2.4.4.20120605 lib/mail/elements/date_time_element.rb
otherinbox-mail-2.4.4 lib/mail/elements/date_time_element.rb