2015-11-16 17:49:35 +01:00
|
|
|
/**
|
|
|
|
|
* A global Blaze UI helper to format a DICOM Time for display using the Moment library
|
|
|
|
|
*/
|
|
|
|
|
UI.registerHelper('formatTM', function(context, format) {
|
2015-10-13 14:14:50 +02:00
|
|
|
if (!context) {
|
2016-03-08 13:10:26 +01:00
|
|
|
return;
|
2015-10-13 14:14:50 +02:00
|
|
|
}
|
2016-03-08 13:10:26 +01:00
|
|
|
|
|
|
|
|
var dateTime = moment(context);
|
|
|
|
|
return dateTime.format(format || "HH:mm:ss");
|
2015-10-13 14:14:50 +02:00
|
|
|
});
|