mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
16 lines
365 B
TypeScript
16 lines
365 B
TypeScript
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,
|
|
};
|
|
});
|
|
}
|
|
}
|