Commit ea3ce4bf authored by KangMin An's avatar KangMin An
Browse files

Update: 시간 표시 갱신.

parent 408fa3ba
......@@ -57,7 +57,13 @@ function ChartTabs() {
new Date(userWeather[i].collected_at).getTime()
);
tempLabelArray.push(`${date.getHours()}:${date.getMinutes()}`);
tempLabelArray.push(
`${date.getHours()}:${
date.getMinutes() < 10
? `0${date.getMinutes()}`
: date.getMinutes()
}`
);
labelArray.push(`${date.getHours()}:${date.getMinutes()}`);
}
for (let j = 0; j < userWeatherPredict.length; j++) {
......@@ -65,7 +71,13 @@ function ChartTabs() {
let date = new Date(
new Date(userWeatherPredict[j].collected_at).getTime()
);
tempLabelArray.push(`${date.getHours()}:${date.getMinutes()}`);
tempLabelArray.push(
`${date.getHours()}:${
date.getMinutes() < 10
? `0${date.getMinutes()}`
: date.getMinutes()
}`
);
}
setTemp(tempArray);
......@@ -96,8 +108,20 @@ function ChartTabs() {
let date = new Date(new Date(outWeather[i].collected_at).getTime());
tempLabelArray.push(`${date.getHours()}:${date.getMinutes()}`);
labelArray.push(`${date.getHours()}:${date.getMinutes()}`);
tempLabelArray.push(
`${date.getHours()}:${
date.getMinutes() < 10
? `0${date.getMinutes()}`
: date.getMinutes()
}`
);
labelArray.push(
`${date.getHours()}:${
date.getMinutes() < 10
? `0${date.getMinutes()}`
: date.getMinutes()
}`
);
}
setTemp(tempArray);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment