Here you can find the source of toShortDateString()
Date.prototype.toShortDateString = function() { return this.getFullYear() + "/" + (this.getMonth() + 1) + "/" + this.getDate(); };
String.prototype.toShortDateString = function() { var date = new Date(this); return date.toDateString().substr(4); }; module.exports = { toShortDateString: function(dateString) { var date = new Date(dateString); return date.getDate() + "/" + (date.getMonth() + 1) + "/" + date.getFullYear(); }, ...
Date.prototype.toShortDateString = function () { var tempStr = ''; var dayOfTheMonth = this.getDate(); var month = this.getMonth(); var year = this.getFullYear(); tempStr += dayOfTheMonth.padWithDigits(2) + '-' + month.padWithDigits(2) + '-' + year.padWithDigits(4); return tempStr; };