Skip to content

Commit

Permalink
Merge pull request #574 from dljenkins/patch-1
Browse files Browse the repository at this point in the history
 Issue #488
  • Loading branch information
guyonroche authored Jun 12, 2018
2 parents 832c441 + 12d9236 commit ec0972a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/xlsx/xform/simple/date-xform.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ var DateXform = module.exports = function(options) {
this.tag = options.tag;
this.attr = options.attr;
this.attrs = options.attrs;
this._format = options.format || function(dt) { return dt.toISOString(); };
this._format = options.format || function (dt) {
try {
return dt.toISOString();
} catch(e) {
return '';
}
};
this._parse = options.parse || function(str) { return new Date(str); };
};

Expand Down

0 comments on commit ec0972a

Please sign in to comment.