78 lines
2.4 KiB
Java
78 lines
2.4 KiB
Java
|
package o;
|
||
|
|
||
|
/* renamed from: o.Ixo, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class C0535Ixo {
|
||
|
private final int a;
|
||
|
private final int b;
|
||
|
private final int c;
|
||
|
private final int d;
|
||
|
private final int e;
|
||
|
private final int h;
|
||
|
|
||
|
public static C0535Ixo a(String str) {
|
||
|
if (str.length() != 19 || str.startsWith("9999:99:99")) {
|
||
|
return null;
|
||
|
}
|
||
|
try {
|
||
|
return new C0535Ixo(Integer.parseInt(str.substring(0, 4)), Integer.parseInt(str.substring(5, 7)), Integer.parseInt(str.substring(8, 10)), Integer.parseInt(str.substring(11, 13)), Integer.parseInt(str.substring(14, 16)), Integer.parseInt(str.substring(17, 19)));
|
||
|
} catch (NumberFormatException unused) {
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private C0535Ixo(int i, int i2, int i3, int i4, int i5, int i6) {
|
||
|
this.h = i;
|
||
|
this.c = i2;
|
||
|
this.a = i3;
|
||
|
this.e = i4;
|
||
|
this.d = i5;
|
||
|
this.b = i6;
|
||
|
}
|
||
|
|
||
|
public final String toString() {
|
||
|
return String.format("%04d:%02d:%02d %02d:%02d:%02d", Integer.valueOf(this.h), Integer.valueOf(this.c), Integer.valueOf(this.a), Integer.valueOf(this.e), Integer.valueOf(this.d), Integer.valueOf(this.b));
|
||
|
}
|
||
|
|
||
|
public final String a() {
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
b(sb, this.h, "year");
|
||
|
b(sb, this.c, "month");
|
||
|
b(sb, this.a, "day");
|
||
|
b(sb, this.e, "hour");
|
||
|
b(sb, this.d, "minute");
|
||
|
b(sb, this.b, "second");
|
||
|
return sb.toString();
|
||
|
}
|
||
|
|
||
|
private static void b(StringBuilder sb, int i, String str) {
|
||
|
if (i == 0) {
|
||
|
return;
|
||
|
}
|
||
|
if (sb.length() != 0) {
|
||
|
sb.append(' ');
|
||
|
}
|
||
|
sb.append(i);
|
||
|
sb.append(' ');
|
||
|
sb.append(str);
|
||
|
if (i != 1) {
|
||
|
sb.append('s');
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final boolean equals(Object obj) {
|
||
|
if (this == obj) {
|
||
|
return true;
|
||
|
}
|
||
|
if (obj == null || getClass() != obj.getClass()) {
|
||
|
return false;
|
||
|
}
|
||
|
C0535Ixo c0535Ixo = (C0535Ixo) obj;
|
||
|
return this.a == c0535Ixo.a && this.e == c0535Ixo.e && this.d == c0535Ixo.d && this.c == c0535Ixo.c && this.b == c0535Ixo.b && this.h == c0535Ixo.h;
|
||
|
}
|
||
|
|
||
|
public final int hashCode() {
|
||
|
return (((((((((this.h * 31) + this.c) * 31) + this.a) * 31) + this.e) * 31) + this.d) * 31) + this.b;
|
||
|
}
|
||
|
}
|