mirror of
https://github.com/nasa/openmct.git
synced 2025-05-08 11:38:35 +00:00
[Timeline] Format exported start/end times
This commit is contained in:
parent
b383921f2a
commit
14b8e02f27
@ -21,9 +21,11 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define([], function () {
|
define(['../TimelineFormatter'], function (TimelineFormatter) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var FORMATTER = new TimelineFormatter();
|
||||||
|
|
||||||
function TimespanColumn(isStart) {
|
function TimespanColumn(isStart) {
|
||||||
this.isStart = isStart;
|
this.isStart = isStart;
|
||||||
}
|
}
|
||||||
@ -36,7 +38,9 @@ define([], function () {
|
|||||||
var isStart = this.isStart;
|
var isStart = this.isStart;
|
||||||
return domainObject.hasCapability('timespan') ?
|
return domainObject.hasCapability('timespan') ?
|
||||||
domainObject.useCapability('timespan').then(function (timespan) {
|
domainObject.useCapability('timespan').then(function (timespan) {
|
||||||
return isStart ? timespan.getStart() : timespan.getEnd();
|
return FORMATTER.format(
|
||||||
|
isStart ? timespan.getStart() : timespan.getEnd()
|
||||||
|
);
|
||||||
}) : "";
|
}) : "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user