flipped the if/else for performance optimization

This commit is contained in:
Andy Scherzinger 2015-10-16 11:41:26 +02:00
parent be83702fd7
commit e8eda963ae

View file

@ -210,10 +210,10 @@ public class DisplayUtils {
String[] parts = dateString.toString().split(",");
if (parts.length == 2) {
if(parts[0].contains(":") && !parts[1].contains(":")) {
return parts[1];
} else if(parts[1].contains(":") && !parts[0].contains(":")) {
if (parts[1].contains(":") && !parts[0].contains(":")) {
return parts[0];
} else if (parts[0].contains(":") && !parts[1].contains(":")) {
return parts[1];
}
}
//dateString contains unexpected format. use localized, absolute date.