Changeset 31891

Show
Ignore:
Timestamp:
17.08.2017 11:34:10 (5 weeks ago)
Author:
kjdon
Message:

need to check for 00 day in getDetailFromDate too, otherwise get the previous month returned when day is 00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/XSLTUtil.java

    r31866 r31891  
    570570            in_pattern = "yyyyMM"; 
    571571        } 
     572        // remove the 00 
     573        else if (date.length() == 8 && date.endsWith("00")) { 
     574          date = date.substring(0,6); 
     575          in_pattern = "yyyyMM"; 
     576        } 
    572577 
    573578        SimpleDateFormat formatter = new SimpleDateFormat(in_pattern, new Locale(lang));