Permalink
Browse files

Fixed Date.prototype.toYMD() not accepting empty string as separator.

  • Loading branch information...
1 parent 893b159 commit fe02eb5b09b5c6ad61a894683ea6c06625a57908 Branko Vukelic committed Aug 28, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/date-utils.js
View
@@ -498,7 +498,7 @@ THE SOFTWARE.
});
polyfill('toYMD', function (separator) {
- separator = separator || '-';
+ separator = typeof separator === 'string' ? separator : '-';
return this.getFullYear() + separator + pad(this.getMonth() + 1, 2) +
separator + pad(this.getDate(), 2);
});

0 comments on commit fe02eb5

Please sign in to comment.