examples/date_time.rb in write_xlsx-1.10.0 vs examples/date_time.rb in write_xlsx-1.10.1
- old
+ new
@@ -12,11 +12,11 @@
require 'write_xlsx'
workbook = WriteXLSX.new('date_time.xlsx')
worksheet = workbook.add_worksheet
-bold = workbook.add_format(:bold => 1)
+bold = workbook.add_format(bold: 1)
# Expand the first column so that the date is visible.
worksheet.set_column('A:B', 30)
# Write the column headers.
@@ -62,11 +62,11 @@
row += 1
next if date_format == ''
# Create a format for the date or time.
format = workbook.add_format(
- :num_format => date_format,
- :align => 'left'
+ num_format: date_format,
+ align: 'left'
)
# Write the same date using different formats.
worksheet.write_date_time(row, 0, '2004-08-01T12:30:45.123', format)
worksheet.write(row, 1, date_format)