what-the-bank/sources/o/C15240gl.java

70 lines
2.3 KiB
Java

package o;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/* renamed from: o.gl, reason: case insensitive filesystem */
/* loaded from: classes3.dex */
public final class C15240gl {
public static String b(String str) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy");
try {
simpleDateFormat.setLenient(false);
Date parse = simpleDateFormat.parse(str);
Calendar.getInstance().setTime(parse);
return simpleDateFormat.format(parse);
} catch (ParseException e) {
guQ.a(e.getMessage(), new Object[0]);
return "";
}
}
public static String e(String str, String str2, String str3) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(str2);
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat(str3);
try {
simpleDateFormat2.setLenient(false);
Date parse = simpleDateFormat2.parse(str);
simpleDateFormat.setLenient(false);
return simpleDateFormat.format(parse);
} catch (ParseException e) {
guQ.a(e.getMessage(), new Object[0]);
return "";
}
}
public static String e(String str, String str2) {
String[] split = str.split(str2);
if (split.length != 3) {
return "";
}
StringBuilder sb = new StringBuilder();
sb.append(split[0]);
sb.append(str2);
sb.append(split[1]);
sb.append(str2);
int parseInt = Integer.parseInt(split[2]);
if (parseInt - 443 > Calendar.getInstance().get(1)) {
parseInt -= 543;
}
sb.append(parseInt);
return sb.toString();
}
public static Date a(String str, String str2) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(str2);
try {
simpleDateFormat.setLenient(false);
return simpleDateFormat.parse(str);
} catch (IllegalArgumentException unused) {
guQ.a("Illegal argument when parsing Date", new Object[0]);
return null;
} catch (ParseException unused2) {
guQ.a("Date is null", new Object[0]);
return null;
}
}
}