interface Date { toSQLDate(): string, } Date.prototype.toSQLDate = function (): string { return (new Date(this)).toISOString().split('T')[0] }