import moment from 'moment';
import 'moment/dist/locale/vi';

moment.locale('vi');

export default moment;

export const getDateOnly = (input = null) => moment(input).format('YYYY-MM-DD').toString();
export const getYearOnly = (input = null) => moment(input).format('YYYY').toString();
export const getMonthOnly = (input = null) => moment(input).format('YYYY-MM').toString();
export const getTimeOnly = (input = null) => moment(input).format('HH:mm:ss').toString();
export const getDateTime = (input = null) => moment(input).format('YYYY-MM-DD HH:mm:ss').toString();
