Skip to content

Commit

Permalink
Fixed Date.prototype.toYMD() not accepting empty string as separator.
Browse files Browse the repository at this point in the history
  • Loading branch information
Branko Vukelic committed Aug 28, 2011
1 parent 893b159 commit fe02eb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/date-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit fe02eb5

Please sign in to comment.