move formatDate to ohif/core
This commit is contained in:
1 parent
a5170076db
commit
9145215596
8 files changed
+21
-17
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);
|
||||
};
|
||||
@@ -15,6 +15,7 @@ import makeCancelable from './makeCancelable';
|
||||
import hotkeys from './hotkeys';
|
||||
import Queue from './Queue';
|
||||
import isDicomUid from './isDicomUid';
|
||||
import formatDate from './formatDate';
|
||||
import formatPN from './formatPN';
|
||||
import resolveObjectPath from './resolveObjectPath';
|
||||
import * as hierarchicalListUtils from './hierarchicalListUtils';
|
||||
@@ -27,6 +28,7 @@ const utils = {
|
||||
addServers,
|
||||
sortBy,
|
||||
writeScript,
|
||||
formatDate,
|
||||
formatPN,
|
||||
b64toBlob,
|
||||
StackManager,
|
||||
@@ -50,6 +52,7 @@ export {
|
||||
absoluteUrl,
|
||||
addServers,
|
||||
sortBy,
|
||||
formatDate,
|
||||
writeScript,
|
||||
b64toBlob,
|
||||
StackManager,
|
||||
|
||||
Reference in new issue
Block a user