lib/rb-dayone/entry_importer.rb in rb-dayone-0.6.0 vs lib/rb-dayone/entry_importer.rb in rb-dayone-0.7.1

- old
+ new

@@ -42,24 +42,25 @@ self['Entry Text'], starred: self['Starred'], creation_date: self['Creation Date'], saved: true, tags: self['Tags']||[], - location: self['Location']||{} + location: self['Location']||{}, + uuid: self["UUID"] ) end private + # TODO Import images + # Process an XML tag. Returns a the value of the tag as a ruby value. # @param [Nokogiri::XML::Element] element The element to process # @return The values contained within the element def process_value element case element.name when 'date' - if element.content =~ /(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)Z/ - Time.utc($1.to_i, $2.to_i, $3.to_i, $4.to_i, $5.to_i, $6.to_i) - end + Time.parse(element.content) when 'string' element.content when 'real' element.content.to_f when 'true' \ No newline at end of file