mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat(nestjs): migrate to NestJS
This commit is contained in:
14
packages/server/src/utils/moment-mysql.ts
Normal file
14
packages/server/src/utils/moment-mysql.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user