lib/rtf/information.rb in clbustos-rtf-0.2.2 vs lib/rtf/information.rb in clbustos-rtf-0.3.0

- old
+ new

@@ -1,10 +1,9 @@ #!/usr/bin/env ruby require 'stringio' -require 'parsedate' - +require 'date' module RTF # This class represents an information group for a RTF document. class Information # Attribute accessor. attr_reader :title, :author, :company, :created, :comments @@ -54,10 +53,10 @@ # specified. def created=(setting) if setting.instance_of?(Time) @created = setting else - datetime = ParseDate::parsedate(setting.to_s) + datetime = Date._parse(setting.to_s).values_at(:year, :mon, :mday, :hour, :min, :sec, :zone, :wday) if datetime == nil RTFError.fire("Invalid document creation date/time information "\ "specified.") end @created = Time.local(datetime[0], datetime[1], datetime[2], \ No newline at end of file