Skip to content
Snippets Groups Projects
Commit 316b8bec authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Remove April 1st as limiting start date

parent 8ab0fad9
No related branches found
No related tags found
No related merge requests found
...@@ -99,18 +99,12 @@ public class RoughageNutritionModel implements Model { ...@@ -99,18 +99,12 @@ public class RoughageNutritionModel implements Model {
); );
List<Result> results = new ArrayList<>(); List<Result> results = new ArrayList<>();
// Get april first of the current year
Calendar cal = Calendar.getInstance(this.timeZone);
cal.setTime(firstHarvest);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.DATE, 1);
Date aprilFirst = new WeatherUtil().normalizeToExactDate(cal.getTime(), timeZone);
// Get all labels // Get all labels
//Set labels = resultMatrix.getValueLabelsForDate(aprilFirst); //Set labels = resultMatrix.getValueLabelsForDate(aprilFirst);
Date resultDate = aprilFirst; Date resultDate = firstPossibleGrowthStartDate;
// Iterate all dates in matrix, starting April 1st // Iterate all dates in matrix, starting on the firstPossibleGrowthStartDate
Calendar cal = Calendar.getInstance(this.timeZone);
while(resultMatrix.getValueLabelsForDate(resultDate) != null) while(resultMatrix.getValueLabelsForDate(resultDate) != null)
{ {
Result result = new ResultImpl(); Result result = new ResultImpl();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment