Something went wrong. Try again.
A bot that helps you manage and track your daily expenses.
Something went wrong. Try again.
1234567891011121314151617181920"use strict";
const df = require('dateformat');
class Expense { constructor(user, amount, description, timestamp, category) { this.user = user; this.amount = amount; this.description = description; this.category = category; this.timestamp = timestamp; }
toString () { var d = new Date(this.timestamp); return `[${df(d, 'mmmm dS')}] ${this.amount} - ${this.description}${this.category ? ' - ' + this.category : ''}` }}
module.exports = Expense;