Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit fe02eb5b09b5c6ad61a894683ea6c06625a57908 1 parent 893b159
Branko Vukelic authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/date-utils.js
View
2  lib/date-utils.js
@@ -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);
});
Please sign in to comment.
Something went wrong with that request. Please try again.