Displaying differences for changeset
 
display as  

src/java/cfa/DoubleArray.java

@@ -809,13 +809,22 @@
             int currentDay = (int) currentDay_double;
             Calendar currentDate = new GregorianCalendar(currentYear, currentMonth - 1, currentDay);
 
-            endDate.set(Calendar.YEAR, currentYear);
+            
             if(previousYearSeasonTF){
                 //if the start of the "season" is the year before the end of the season (ex. October to February)
-                beginDate.set(Calendar.YEAR, currentYear - 1);
+                if(currentMonth > monthBegin){
+                    //If begin = October and current = December, set begin date to same year as data and set end date to next year
+                    beginDate.set(Calendar.YEAR, currentYear);
+                    endDate.set(Calendar.YEAR, currentYear + 1);
+                }else{
+                    //If begin = October and current = February, set begin date to last year and set end date to same year as data
+                    beginDate.set(Calendar.YEAR, currentYear - 1);
+                    endDate.set(Calendar.YEAR, currentYear);
+                }
             }else{
                 //the start and end of the "season" are within the same year (ex. February to October)
                 beginDate.set(Calendar.YEAR, currentYear);
+                endDate.set(Calendar.YEAR, currentYear);
             }
             if(currentDate.compareTo(beginDate) >= 0 && currentDate.compareTo(endDate) <= 0){
                 partialDates.add(allData[i][0]);