summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/stylesheet
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2011-12-01 14:38:13 +0900
committerRandy Morgan <[email protected]>2011-12-01 14:38:13 +0900
commit6439ce4d2ec5c97ad82a8dc10d974ca9754f2113 (patch)
tree87b3958c6cff8b7c2aed2804702a8ff8089d841f /lib/axlsx/stylesheet
parent8cf0296bbc16e8eb535e9af932eed2557d5e66d2 (diff)
downloadcaxlsx-6439ce4d2ec5c97ad82a8dc10d974ca9754f2113.tar.gz
caxlsx-6439ce4d2ec5c97ad82a8dc10d974ca9754f2113.zip
added default formatting for date types when the cell style is 0 and the data type is :time
Diffstat (limited to 'lib/axlsx/stylesheet')
-rw-r--r--lib/axlsx/stylesheet/styles.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb
index 6b64fb30..de5835dd 100644
--- a/lib/axlsx/stylesheet/styles.rb
+++ b/lib/axlsx/stylesheet/styles.rb
@@ -286,6 +286,8 @@ module Axlsx
@cellXfs = SimpleTypedList.new Xf, "cellXfs"
@cellXfs << Xf.new(:borderId=>0, :xfId=>0, :numFmtId=>0, :fontId=>0, :fillId=>0)
@cellXfs << Xf.new(:borderId=>1, :xfId=>0, :numFmtId=>0, :fontId=>0, :fillId=>0)
+ # default date formatting
+ @cellXfs << Xf.new(:borderId=>0, :xfId=>0, :numFmtId=>14, :fontId=>0, :fillId=>0)
@cellXfs.lock
@dxfs = SimpleTypedList.new(Xf, "dxfs"); @dxfs.lock