8
8
import {capitalize , computed , onMounted , Ref , ref } from " vue" ;
9
9
import Tooltip from " ../../tooltip.vue" ;
10
10
import {ArtifactDescription } from " ../../types" ;
11
- import {daysBetweenDates , getFutureDate , getPastDate } from " ./utils" ;
11
+ import {daysBetweenDates , getFutureDate , getPastDate , formatDate } from " ./utils" ;
12
12
import {GraphRenderOpts , renderPlots } from " ../../../../graph/render" ;
13
13
import {GraphData , GraphKind , GraphsSelector } from " ../../../../graph/data" ;
14
14
import uPlot from " uplot" ;
@@ -55,7 +55,7 @@ function getGraphRange(artifact: ArtifactDescription): GraphRange {
55
55
// the last `DAY_RANGE` days.
56
56
if (artifact .type === " try" ) {
57
57
return {
58
- start: getPastDate (date , DAY_RANGE ),
58
+ start: formatDate ( getPastDate (date , DAY_RANGE ) ),
59
59
end: artifact .commit ,
60
60
date: null ,
61
61
};
@@ -66,7 +66,7 @@ function getGraphRange(artifact: ArtifactDescription): GraphRange {
66
66
// Calculate the end of the range, which is commit date + half of the
67
67
// amount of days we want to show. If this date is in the future,
68
68
// the server will clip the result at the current date.
69
- const end = getFutureDate (date , DAY_RANGE / 2 );
69
+ const end = formatDate ( getFutureDate (date , DAY_RANGE / 2 ) );
70
70
71
71
// Calculate how many days there have been from the commit date
72
72
const daysInFuture = Math .min (
@@ -78,7 +78,7 @@ function getGraphRange(artifact: ArtifactDescription): GraphRange {
78
78
// the days that will be clipped by the server.
79
79
const daysInPast = DAY_RANGE - daysInFuture ;
80
80
81
- const start = getPastDate (date , daysInPast );
81
+ const start = formatDate ( getPastDate (date , daysInPast ) );
82
82
return {
83
83
start ,
84
84
end ,
0 commit comments