lib/write_xlsx/utility.rb in write_xlsx-0.65.1 vs lib/write_xlsx/utility.rb in write_xlsx-0.69.0

- old
+ new

@@ -117,27 +117,20 @@ # Returns: # A decimal number representing a valid Excel date, or # nil if the date is invalid. # def convert_date_time(date_time_string) #:nodoc: - date_time = date_time_string + date_time = date_time_string.sub(/^\s+/, '').sub(/\s+$/, '').sub(/Z$/, '') - days = 0 # Number of days since epoch - seconds = 0 # Time expressed as fraction of 24h hours in seconds - - # Strip leading and trailing whitespace. - date_time.sub!(/^\s+/, '') - date_time.sub!(/\s+$/, '') - # Check for invalid date char. return nil if date_time =~ /[^0-9T:\-\.Z]/ # Check for "T" after date or before time. return nil unless date_time =~ /\dT|T\d/ - # Strip trailing Z in ISO8601 date. - date_time.sub!(/Z$/, '') + days = 0 # Number of days since epoch + seconds = 0 # Time expressed as fraction of 24h hours in seconds # Split into date and time. date, time = date_time.split(/T/) # We allow the time portion of the input DateTime to be optional. @@ -492,8 +485,12 @@ # def write_stroke attributes = ['joinstyle', 'miter'] @writer.empty_tag('v:stroke', attributes) + end + + def r_id_attributes(id) + ['r:id', "rId#{id}"] end end end