#9 -- fix dates
This commit is contained in:
parent
17d21c1312
commit
aa4f4a91c4
@ -26,7 +26,6 @@ import java.io.IOException;
|
|||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -74,9 +73,10 @@ public class IndexController {
|
|||||||
ModelingResult modelingResult = timeSeriesService.getForecast(timeSeries, countForecastPoints);
|
ModelingResult modelingResult = timeSeriesService.getForecast(timeSeries, countForecastPoints);
|
||||||
TimeSeries forecast = modelingResult.getTimeSeries();
|
TimeSeries forecast = modelingResult.getTimeSeries();
|
||||||
TimeSeries testForecast = modelingResult.getTestForecast();
|
TimeSeries testForecast = modelingResult.getTestForecast();
|
||||||
Set<String> dates = timeSeries.getValues().stream()
|
List<String> dates = timeSeries.getValues().stream()
|
||||||
.map(v -> v.getDate().format(DateTimeFormatter.ISO_DATE))
|
.map(v -> v.getDate().format(DateTimeFormatter.ISO_DATE))
|
||||||
.collect(Collectors.toSet());
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
dates.addAll(forecast.getValues().stream()
|
dates.addAll(forecast.getValues().stream()
|
||||||
.map(v -> v.getDate().format(DateTimeFormatter.ISO_DATE))
|
.map(v -> v.getDate().format(DateTimeFormatter.ISO_DATE))
|
||||||
.collect(Collectors.toSet()));
|
.collect(Collectors.toSet()));
|
||||||
|
Loading…
Reference in New Issue
Block a user