Changeset 31866 for main/trunk

Show
Ignore:
Timestamp:
10.08.2017 14:03:00 (2 years ago)
Author:
kjdon
Message:

handle properly 6 digit dates - only output month and year otherwise you get erroneous 01 day. Also handle the case where user has put 00 for the day - remove and pretend it was 6 digits

Files:
1 modified

Legend:

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

    r30860 r31866  
    497497        { 
    498498            in_pattern = "yyyyMM"; 
     499            out_pattern = "MMMM yyyy"; 
     500        } 
     501        // remove the 00 
     502        else if (date.length() == 8 && date.endsWith("00")) { 
     503          date = date.substring(0,6); 
     504          in_pattern = "yyyyMM"; 
     505          out_pattern = "MMMM yyyy"; 
    499506        } 
    500507