mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
add server to monorepo.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
export const DATE_FORMATS = [
|
||||
'MM/DD/YY',
|
||||
'DD/MM/YY',
|
||||
'YY/MM/DD',
|
||||
'MM/DD/yyyy',
|
||||
'DD/MM/yyyy',
|
||||
'yyyy/MM/DD',
|
||||
'DD MMM YYYY',
|
||||
'DD MMMM YYYY',
|
||||
'MMMM DD, YYYY',
|
||||
];
|
||||
@@ -0,0 +1,15 @@
|
||||
import moment from 'moment-timezone';
|
||||
import { Service } from 'typedi';
|
||||
import { DATE_FORMATS } from './constants';
|
||||
|
||||
@Service()
|
||||
export default class DateFormatsService {
|
||||
getDateFormats() {
|
||||
return DATE_FORMATS.map((dateFormat) => {
|
||||
return {
|
||||
label: `${moment().format(dateFormat)} [${dateFormat}]`,
|
||||
key: dateFormat,
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { Service } from 'typedi';
|
||||
|
||||
@Service()
|
||||
export default class MiscService {
|
||||
getDateFormats() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user