public static int compareToDDMMYYYY ( String date1 , String date2 ) { if ( date1 . length ( ) != 8 || date2 . length ( ) != 8 ) return 0 ; return compareToDDMMYYYY0 ( date1 ) - compareToDDMMYYYY0 ( date2 ) ; }
Compare one date to another must be in the DDMMYYYY format .