/*
 * Formatting options
 * Created by: Michael Pastushkov <max@pastushkov.com>
 */

const date = require('date-and-time');

class Formats {

    static DATE = 'MM/DD/YYYY';
    static DATE_SHORT = 'MM/DD';
    static DATE_EDIT = 'YYYY-MM-DD';
    static TIME = 'HH:mm:ss';
    static DATETIME = 'MM-DD-YYYY HH:mm:ss';
    static DATETIME_SHORT = 'MM/DD HH:mm:ss';

    static Date(d) { return date.format(d, Formats.DATE); }
    static DateShort(d) { return date.format(d, Formats.DATE_SHORT); }
    static DateEdit(d) { return date.format(d, Formats.DATE_EDIT); }
    static Time(d) { return date.format(d, Formats.TIME); }
    static DateTime(d) { return date.format(d, Formats.DATETIME); }
    static DateTimeShort(d) { return date.format(d, Formats.DATETIME_SHORT); }

}

module.exports = Formats;