Changeset 3488


Ignore:
Timestamp:
09/09/10 10:01:26 (17 months ago)
Author:
erikroos
Message:

Total numbers in Yearly Report 4 now internally consistent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molgenis_projects/molgenis4phenotype/handwritten/java/plugin/yearlyreportplugin/VWAReport4.java

    r3482 r3488  
    4242                        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.US); 
    4343                        Date startOfYear = sdf.parse(year + "-01-01"); 
    44                         Date endOfYear = sdf.parse(year + "-12-31"); 
     44                        Date endOfYear = sdf.parse((year + 1) + "-01-01"); 
    4545                         
    4646                        List<Integer> aliveEndOfPrevYearList = new ArrayList<Integer>(); 
     
    9797                                                        aliveEndOfPrevYear = true; // can be changed later if we find out this one is dead! 
    9898                                                } 
     99                                        } else { 
     100                                                // Don't consider animals that have no 'Alive' status start date 
     101                                                skipAnimal = true; 
    99102                                        } 
    100103                                } else { 
     
    137140                                if (valueList.size() > 0) { 
    138141                                        int speciesid = valueList.get(0).getRelatedObservationTarget(); 
    139                                         if (!speciesIdList.contains(speciesid)) { 
     142                                        if (!speciesIdList.contains(speciesid)) { // new species 
    140143                                                speciesIdList.add(speciesid); 
    141144                                                // Plus, store numbers on status for right species 
     
    150153                                                        aliveEndOfPrevYearList.add(0); 
    151154                                                } 
    152                                         } else { 
     155                                        } else { // species already in list 
    153156                                                int specid = speciesIdList.indexOf(speciesid); 
    154157                                                if (aliveEndOfPrevYear) { 
Note: See TracChangeset for help on using the changeset viewer.