mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
15 lines
328 B
TypeScript
15 lines
328 B
TypeScript
import * as moment from 'moment';
|
|
|
|
// Extends moment prototype to add a new method to format date to MySQL datetime format.
|
|
moment.prototype.toMySqlDateTime = function () {
|
|
return this.format('YYYY-MM-DD HH:mm:ss');
|
|
};
|
|
|
|
declare global {
|
|
namespace moment {
|
|
interface Moment {
|
|
toMySqlDateTime(): string;
|
|
}
|
|
}
|
|
}
|