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

215 lines
4.9 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Locale;
import java.util.TimeZone;
/* loaded from: classes.dex */
public final class KUl implements ogk {
private boolean a;
private int b;
private boolean c;
private boolean d;
private int e;
private int f;
private TimeZone g;
private int h;
private int i;
private int j;
private int m;
public KUl() {
this.m = 0;
this.h = 0;
this.b = 0;
this.e = 0;
this.i = 0;
this.f = 0;
this.g = null;
this.a = false;
this.d = false;
this.c = false;
}
public KUl(Calendar calendar) {
this.m = 0;
this.h = 0;
this.b = 0;
this.e = 0;
this.i = 0;
this.f = 0;
this.g = null;
this.a = false;
this.d = false;
this.c = false;
Date time = calendar.getTime();
TimeZone timeZone = calendar.getTimeZone();
GregorianCalendar gregorianCalendar = (GregorianCalendar) Calendar.getInstance(Locale.US);
gregorianCalendar.setGregorianChange(new Date(Long.MIN_VALUE));
gregorianCalendar.setTimeZone(timeZone);
gregorianCalendar.setTime(time);
this.m = gregorianCalendar.get(1);
this.h = gregorianCalendar.get(2) + 1;
this.b = gregorianCalendar.get(5);
this.e = gregorianCalendar.get(11);
this.i = gregorianCalendar.get(12);
this.f = gregorianCalendar.get(13);
this.j = gregorianCalendar.get(14) * 1000000;
this.g = gregorianCalendar.getTimeZone();
this.c = true;
this.d = true;
this.a = true;
}
@Override // o.ogk
public final void i(int i) {
this.m = Math.min(Math.abs(i), gsX.MAX_VALUE_OF_ERA);
this.a = true;
}
@Override // o.ogk
public final void a(int i) {
this.e = Math.min(Math.abs(i), 23);
this.d = true;
}
@Override // o.ogk
public final void e(int i) {
this.i = Math.min(Math.abs(i), 59);
this.d = true;
}
@Override // o.ogk
public final void h(int i) {
this.f = Math.min(Math.abs(i), 59);
this.d = true;
}
@Override // java.lang.Comparable
public final int compareTo(Object obj) {
float signum;
long timeInMillis = b().getTimeInMillis() - ((ogk) obj).b().getTimeInMillis();
if (timeInMillis != 0) {
signum = Math.signum((float) timeInMillis);
} else {
signum = Math.signum(this.j - r5.g());
}
return (int) signum;
}
@Override // o.ogk
public final Calendar b() {
GregorianCalendar gregorianCalendar = (GregorianCalendar) Calendar.getInstance(Locale.US);
gregorianCalendar.setGregorianChange(new Date(Long.MIN_VALUE));
if (this.c) {
gregorianCalendar.setTimeZone(this.g);
}
gregorianCalendar.set(1, this.m);
gregorianCalendar.set(2, this.h - 1);
gregorianCalendar.set(5, this.b);
gregorianCalendar.set(11, this.e);
gregorianCalendar.set(12, this.i);
gregorianCalendar.set(13, this.f);
gregorianCalendar.set(14, this.j / 1000000);
return gregorianCalendar;
}
public final String toString() {
return C17270vQX.a(this);
}
@Override // o.ogk
public final void c(TimeZone timeZone) {
this.g = timeZone;
this.d = true;
this.c = true;
}
@Override // o.ogk
public final void d(int i) {
this.j = i;
this.d = true;
}
@Override // o.ogk
public final void b(int i) {
if (i <= 0) {
this.h = 1;
} else if (i > 12) {
this.h = 12;
} else {
this.h = i;
}
this.a = true;
}
@Override // o.ogk
public final void c(int i) {
if (i <= 0) {
this.b = 1;
} else if (i > 31) {
this.b = 31;
} else {
this.b = i;
}
this.a = true;
}
@Override // o.ogk
public final boolean k() {
return this.c;
}
@Override // o.ogk
public final boolean m() {
return this.d;
}
@Override // o.ogk
public final boolean f() {
return this.a;
}
@Override // o.ogk
public final int j() {
return this.m;
}
@Override // o.ogk
public final TimeZone i() {
return this.g;
}
@Override // o.ogk
public final int h() {
return this.f;
}
@Override // o.ogk
public final int g() {
return this.j;
}
@Override // o.ogk
public final int d() {
return this.h;
}
@Override // o.ogk
public final int a() {
return this.i;
}
@Override // o.ogk
public final int c() {
return this.e;
}
@Override // o.ogk
public final int e() {
return this.b;
}
}