determineDate fixed, ALL case added