I watched a code snippet How to subtract date / time in javascript? which looks like
Date.prototype.diffDays = function (date: Date): number {
var utcThis = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate(), this.getHours(), this.getMinutes(), this.getSeconds(), this.getMilliseconds());
var utcOther = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
return (utcThis - utcOther) / 86400000;
};
and I’m wondering what that means (date: Date): number, since I’ve never seen anything like it, and I know that it doesn’t look like ECA6 or anything else since the message was made in 2011
source
share