Um das Datum zu formatieren, habe ich versucht, eine Methode zu prototypieren.Date.prototype.format ist keine Funktion
Date.prototype.formatYYYYMMDDHHMMSS = function() {
return (this.getFullYear() + eval(this.getMonth() + 1)
+ this.getDate() + this.getHours() + this.getMinutes() + this.getSeconds());
};
var upload = Date.now();
var uploadDate = upload.formatYYYYMMDDHHMMSS();
aber folgende Fehler wird angezeigt:
upload.formatYYYYMMDDHHMMSS is not a function
Upload ist kein Date-Objekt. Es ist eine Nummer –
Tun Sie sich einen Gefallen und verwenden Sie moment.js – Iso