fix date format
This commit is contained in:
1 parent
ec48801be7
commit
a5170076db
6 files changed
+39
-18
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import moment from 'moment';
|
||||
|
||||
/**
|
||||
* Format date
|
||||
*
|
||||
* @param {string} date Date to be formatted
|
||||
* @param {string} format Desired date format
|
||||
* @returns {string} Formatted date
|
||||
*/
|
||||
export default (date, format = 'DD-MMM-YYYY') => {
|
||||
return moment(date).format(format);
|
||||
};
|
||||
@@ -1,7 +1,8 @@
|
||||
import getMockedStudies from './getMockedStudies';
|
||||
import getFormattedDate from './getFormattedDate';
|
||||
|
||||
const utils = { getMockedStudies };
|
||||
const utils = { getMockedStudies, getFormattedDate };
|
||||
|
||||
export { getMockedStudies };
|
||||
export { getMockedStudies, getFormattedDate };
|
||||
|
||||
export default utils;
|
||||
Reference in new issue
Block a user