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

776 lines
28 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.huawei.hms.android.HwBuildEx;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.io.InvalidObjectException;
import java.io.ObjectStreamException;
import java.io.Serializable;
import org.threeten.bp.DateTimeException;
import org.threeten.bp.OffsetDateTime;
import org.threeten.bp.temporal.UnsupportedTemporalTypeException;
/* renamed from: o.gsp, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C15520gsp extends gsJ implements Serializable {
static final long DAYS_0000_TO_1970 = 719528;
private static final int DAYS_PER_CYCLE = 146097;
private static final long serialVersionUID = 2942565459149668126L;
short day;
short month;
int year;
public static final C15520gsp MIN = of(gsF.MIN_VALUE, 1, 1);
public static final C15520gsp MAX = of(gsF.MAX_VALUE, 12, 31);
public static final gtQ<C15520gsp> FROM = new gtQ<C15520gsp>() { // from class: o.gsp.2
@Override // o.gtQ
public final C15520gsp queryFrom(gtK gtk) {
return C15520gsp.from(gtk);
}
};
@Override // o.gsJ, java.lang.Comparable
public final /* bridge */ /* synthetic */ int compareTo(gsJ gsj) {
return compareTo(gsj);
}
public static C15520gsp now() {
return now(AbstractC15514gsj.systemDefaultZone());
}
public static C15520gsp now(AbstractC15502gsH abstractC15502gsH) {
return now(AbstractC15514gsj.system(abstractC15502gsH));
}
public static C15520gsp now(AbstractC15514gsj abstractC15514gsj) {
gtG.requireNonNull(abstractC15514gsj, "clock");
return ofEpochDay(gtG.floorDiv(abstractC15514gsj.instant().getEpochSecond() + abstractC15514gsj.getZone().getRules().getOffset(r0).getTotalSeconds(), 86400L));
}
public static C15520gsp of(int i, EnumC15528gsx enumC15528gsx, int i2) {
EnumC15534gtD.YEAR.checkValidValue(i);
gtG.requireNonNull(enumC15528gsx, "month");
EnumC15534gtD.DAY_OF_MONTH.checkValidValue(i2);
return create(i, enumC15528gsx, i2);
}
public static C15520gsp of(int i, int i2, int i3) {
EnumC15534gtD.YEAR.checkValidValue(i);
EnumC15534gtD.MONTH_OF_YEAR.checkValidValue(i2);
EnumC15534gtD.DAY_OF_MONTH.checkValidValue(i3);
return create(i, EnumC15528gsx.of(i2), i3);
}
public static C15520gsp ofYearDay(int i, int i2) {
long j = i;
EnumC15534gtD.YEAR.checkValidValue(j);
EnumC15534gtD.DAY_OF_YEAR.checkValidValue(i2);
boolean isLeapYear = gsV.INSTANCE.isLeapYear(j);
if (i2 == 366 && !isLeapYear) {
StringBuilder sb = new StringBuilder("Invalid date 'DayOfYear 366' as '");
sb.append(i);
sb.append("' is not a leap year");
throw new DateTimeException(sb.toString());
}
EnumC15528gsx of = EnumC15528gsx.of(((i2 - 1) / 31) + 1);
if (i2 > (of.firstDayOfYear(isLeapYear) + of.length(isLeapYear)) - 1) {
of = of.plus(1L);
}
return create(i, of, (i2 - of.firstDayOfYear(isLeapYear)) + 1);
}
public static C15520gsp ofEpochDay(long j) {
long j2;
EnumC15534gtD.EPOCH_DAY.checkValidValue(j);
long j3 = 719468 + j;
if (j3 < 0) {
long j4 = ((j + 719469) / 146097) - 1;
j2 = j4 * 400;
j3 += (-j4) * 146097;
} else {
j2 = 0;
}
long j5 = ((j3 * 400) + 591) / 146097;
long j6 = j3 - ((((j5 * 365) + (j5 / 4)) - (j5 / 100)) + (j5 / 400));
if (j6 < 0) {
j5--;
j6 = j3 - ((((365 * j5) + (j5 / 4)) - (j5 / 100)) + (j5 / 400));
}
int i = (int) j6;
int i2 = ((i * 5) + 2) / 153;
return new C15520gsp(EnumC15534gtD.YEAR.checkValidIntValue(j5 + j2 + (i2 / 10)), ((i2 + 2) % 12) + 1, (i - (((i2 * 306) + 5) / 10)) + 1);
}
public static C15520gsp from(gtK gtk) {
C15520gsp c15520gsp = (C15520gsp) gtk.query(gtM.localDate());
if (c15520gsp != null) {
return c15520gsp;
}
StringBuilder sb = new StringBuilder("Unable to obtain LocalDate from TemporalAccessor: ");
sb.append(gtk);
sb.append(", type ");
sb.append(gtk.getClass().getName());
throw new DateTimeException(sb.toString());
}
public static C15520gsp parse(CharSequence charSequence) {
return parse(charSequence, C15554gto.ISO_LOCAL_DATE);
}
public static C15520gsp parse(CharSequence charSequence, C15554gto c15554gto) {
gtG.requireNonNull(c15554gto, "formatter");
return (C15520gsp) c15554gto.parse(charSequence, FROM);
}
private static C15520gsp create(int i, EnumC15528gsx enumC15528gsx, int i2) {
if (i2 <= 28 || i2 <= enumC15528gsx.length(gsV.INSTANCE.isLeapYear(i))) {
return new C15520gsp(i, enumC15528gsx.getValue(), i2);
}
if (i2 == 29) {
StringBuilder sb = new StringBuilder("Invalid date 'February 29' as '");
sb.append(i);
sb.append("' is not a leap year");
throw new DateTimeException(sb.toString());
}
StringBuilder sb2 = new StringBuilder("Invalid date '");
sb2.append(enumC15528gsx.name());
sb2.append(" ");
sb2.append(i2);
sb2.append("'");
throw new DateTimeException(sb2.toString());
}
private static C15520gsp resolvePreviousValid(int i, int i2, int i3) {
if (i2 == 2) {
i3 = Math.min(i3, gsV.INSTANCE.isLeapYear((long) i) ? 29 : 28);
} else if (i2 == 4 || i2 == 6 || i2 == 9 || i2 == 11) {
i3 = Math.min(i3, 30);
}
return of(i, i2, i3);
}
private C15520gsp(int i, int i2, int i3) {
this.year = i;
this.month = (short) i2;
this.day = (short) i3;
}
@Override // o.gsJ, o.gtK
public final boolean isSupported(InterfaceC15537gtP interfaceC15537gtP) {
return super.isSupported(interfaceC15537gtP);
}
@Override // o.gtE, o.gtK
public final gtT range(InterfaceC15537gtP interfaceC15537gtP) {
if (interfaceC15537gtP instanceof EnumC15534gtD) {
EnumC15534gtD enumC15534gtD = (EnumC15534gtD) interfaceC15537gtP;
if (enumC15534gtD.isDateBased()) {
int i = AnonymousClass1.$SwitchMap$org$threeten$bp$temporal$ChronoField[enumC15534gtD.ordinal()];
if (i == 1) {
return gtT.of(1L, lengthOfMonth());
}
if (i == 2) {
return gtT.of(1L, lengthOfYear());
}
if (i == 3) {
return gtT.of(1L, (getMonth() != EnumC15528gsx.FEBRUARY || isLeapYear()) ? 5L : 4L);
}
if (i != 4) {
return interfaceC15537gtP.range();
}
return gtT.of(1L, getYear() <= 0 ? 1000000000L : 999999999L);
}
throw new UnsupportedTemporalTypeException("Unsupported field: ".concat(String.valueOf(interfaceC15537gtP)));
}
return interfaceC15537gtP.rangeRefinedBy(this);
}
@Override // o.gtE, o.gtK
public final int get(InterfaceC15537gtP interfaceC15537gtP) {
if (interfaceC15537gtP instanceof EnumC15534gtD) {
return get0(interfaceC15537gtP);
}
return super.get(interfaceC15537gtP);
}
@Override // o.gtK
public final long getLong(InterfaceC15537gtP interfaceC15537gtP) {
if (interfaceC15537gtP instanceof EnumC15534gtD) {
if (interfaceC15537gtP == EnumC15534gtD.EPOCH_DAY) {
return toEpochDay();
}
if (interfaceC15537gtP == EnumC15534gtD.PROLEPTIC_MONTH) {
return getProlepticMonth();
}
return get0(interfaceC15537gtP);
}
return interfaceC15537gtP.getFrom(this);
}
private int get0(InterfaceC15537gtP interfaceC15537gtP) {
switch (AnonymousClass1.$SwitchMap$org$threeten$bp$temporal$ChronoField[((EnumC15534gtD) interfaceC15537gtP).ordinal()]) {
case 1:
return this.day;
case 2:
return getDayOfYear();
case 3:
return ((this.day - 1) / 7) + 1;
case 4:
int i = this.year;
return i <= 0 ? 1 - i : i;
case 5:
return getDayOfWeek().getValue();
case 6:
return ((this.day - 1) % 7) + 1;
case 7:
return ((getDayOfYear() - 1) % 7) + 1;
case 8:
throw new DateTimeException("Field too large for an int: ".concat(String.valueOf(interfaceC15537gtP)));
case 9:
return ((getDayOfYear() - 1) / 7) + 1;
case 10:
return this.month;
case 11:
throw new DateTimeException("Field too large for an int: ".concat(String.valueOf(interfaceC15537gtP)));
case 12:
return this.year;
case 13:
return this.year <= 0 ? 0 : 1;
default:
throw new UnsupportedTemporalTypeException("Unsupported field: ".concat(String.valueOf(interfaceC15537gtP)));
}
}
@Override // o.gsJ
public final gsV getChronology() {
return gsV.INSTANCE;
}
@Override // o.gsJ
public final gsY getEra() {
return super.getEra();
}
public final EnumC15528gsx getMonth() {
return EnumC15528gsx.of(this.month);
}
public final int getDayOfYear() {
return (getMonth().firstDayOfYear(isLeapYear()) + this.day) - 1;
}
public final EnumC15515gsk getDayOfWeek() {
return EnumC15515gsk.of(gtG.floorMod(toEpochDay() + 3, 7) + 1);
}
@Override // o.gsJ
public final boolean isLeapYear() {
return gsV.INSTANCE.isLeapYear(this.year);
}
@Override // o.gsJ
public final int lengthOfMonth() {
short s = this.month;
return s != 2 ? (s == 4 || s == 6 || s == 9 || s == 11) ? 30 : 31 : isLeapYear() ? 29 : 28;
}
@Override // o.gsJ
public final int lengthOfYear() {
return isLeapYear() ? 366 : 365;
}
@Override // o.gsJ, o.AbstractC15535gtF, o.InterfaceC15536gtL
public final C15520gsp with(gtJ gtj) {
if (gtj instanceof C15520gsp) {
return (C15520gsp) gtj;
}
return (C15520gsp) gtj.adjustInto(this);
}
@Override // o.gsJ, o.InterfaceC15536gtL
public final C15520gsp with(InterfaceC15537gtP interfaceC15537gtP, long j) {
if (interfaceC15537gtP instanceof EnumC15534gtD) {
EnumC15534gtD enumC15534gtD = (EnumC15534gtD) interfaceC15537gtP;
enumC15534gtD.checkValidValue(j);
switch (AnonymousClass1.$SwitchMap$org$threeten$bp$temporal$ChronoField[enumC15534gtD.ordinal()]) {
case 1:
return withDayOfMonth((int) j);
case 2:
return withDayOfYear((int) j);
case 3:
return plusWeeks(j - getLong(EnumC15534gtD.ALIGNED_WEEK_OF_MONTH));
case 4:
if (this.year <= 0) {
j = 1 - j;
}
return withYear((int) j);
case 5:
return plusDays(j - getDayOfWeek().getValue());
case 6:
return plusDays(j - getLong(EnumC15534gtD.ALIGNED_DAY_OF_WEEK_IN_MONTH));
case 7:
return plusDays(j - getLong(EnumC15534gtD.ALIGNED_DAY_OF_WEEK_IN_YEAR));
case 8:
return ofEpochDay(j);
case 9:
return plusWeeks(j - getLong(EnumC15534gtD.ALIGNED_WEEK_OF_YEAR));
case 10:
return withMonth((int) j);
case 11:
return plusMonths(j - getLong(EnumC15534gtD.PROLEPTIC_MONTH));
case 12:
return withYear((int) j);
case 13:
return getLong(EnumC15534gtD.ERA) == j ? this : withYear(1 - this.year);
default:
throw new UnsupportedTemporalTypeException("Unsupported field: ".concat(String.valueOf(interfaceC15537gtP)));
}
}
return (C15520gsp) interfaceC15537gtP.adjustInto(this, j);
}
public final C15520gsp withYear(int i) {
if (this.year == i) {
return this;
}
EnumC15534gtD.YEAR.checkValidValue(i);
return resolvePreviousValid(i, this.month, this.day);
}
public final C15520gsp withMonth(int i) {
if (this.month == i) {
return this;
}
EnumC15534gtD.MONTH_OF_YEAR.checkValidValue(i);
return resolvePreviousValid(this.year, i, this.day);
}
public final C15520gsp withDayOfMonth(int i) {
return this.day == i ? this : of(this.year, this.month, i);
}
public final C15520gsp withDayOfYear(int i) {
return getDayOfYear() == i ? this : ofYearDay(this.year, i);
}
@Override // o.gsJ, o.AbstractC15535gtF, o.InterfaceC15536gtL
public final C15520gsp plus(gtN gtn) {
return (C15520gsp) gtn.addTo(this);
}
@Override // o.gsJ, o.InterfaceC15536gtL
public final C15520gsp plus(long j, InterfaceC15539gtV interfaceC15539gtV) {
if (interfaceC15539gtV instanceof gtH) {
switch (AnonymousClass1.$SwitchMap$org$threeten$bp$temporal$ChronoUnit[((gtH) interfaceC15539gtV).ordinal()]) {
case 1:
return plusDays(j);
case 2:
return plusWeeks(j);
case 3:
return plusMonths(j);
case 4:
return plusYears(j);
case 5:
return plusYears(gtG.safeMultiply(j, 10));
case 6:
return plusYears(gtG.safeMultiply(j, 100));
case 7:
return plusYears(gtG.safeMultiply(j, 1000));
case 8:
return with((InterfaceC15537gtP) EnumC15534gtD.ERA, gtG.safeAdd(getLong(EnumC15534gtD.ERA), j));
default:
throw new UnsupportedTemporalTypeException("Unsupported unit: ".concat(String.valueOf(interfaceC15539gtV)));
}
}
return (C15520gsp) interfaceC15539gtV.addTo(this, j);
}
/* JADX INFO: Access modifiers changed from: package-private */
/* renamed from: o.gsp$1, reason: invalid class name */
/* loaded from: classes.dex */
public static /* synthetic */ class AnonymousClass1 {
static final int[] $SwitchMap$org$threeten$bp$temporal$ChronoField;
static final int[] $SwitchMap$org$threeten$bp$temporal$ChronoUnit;
static {
int[] iArr = new int[gtH.values().length];
$SwitchMap$org$threeten$bp$temporal$ChronoUnit = iArr;
try {
iArr[gtH.DAYS.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.WEEKS.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.MONTHS.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.YEARS.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.DECADES.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.CENTURIES.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.MILLENNIA.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.ERAS.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
int[] iArr2 = new int[EnumC15534gtD.values().length];
$SwitchMap$org$threeten$bp$temporal$ChronoField = iArr2;
try {
iArr2[EnumC15534gtD.DAY_OF_MONTH.ordinal()] = 1;
} catch (NoSuchFieldError unused9) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.DAY_OF_YEAR.ordinal()] = 2;
} catch (NoSuchFieldError unused10) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.ALIGNED_WEEK_OF_MONTH.ordinal()] = 3;
} catch (NoSuchFieldError unused11) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.YEAR_OF_ERA.ordinal()] = 4;
} catch (NoSuchFieldError unused12) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.DAY_OF_WEEK.ordinal()] = 5;
} catch (NoSuchFieldError unused13) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.ALIGNED_DAY_OF_WEEK_IN_MONTH.ordinal()] = 6;
} catch (NoSuchFieldError unused14) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.ALIGNED_DAY_OF_WEEK_IN_YEAR.ordinal()] = 7;
} catch (NoSuchFieldError unused15) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.EPOCH_DAY.ordinal()] = 8;
} catch (NoSuchFieldError unused16) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.ALIGNED_WEEK_OF_YEAR.ordinal()] = 9;
} catch (NoSuchFieldError unused17) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.MONTH_OF_YEAR.ordinal()] = 10;
} catch (NoSuchFieldError unused18) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.PROLEPTIC_MONTH.ordinal()] = 11;
} catch (NoSuchFieldError unused19) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.YEAR.ordinal()] = 12;
} catch (NoSuchFieldError unused20) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.ERA.ordinal()] = 13;
} catch (NoSuchFieldError unused21) {
}
}
}
public final C15520gsp plusYears(long j) {
return j == 0 ? this : resolvePreviousValid(EnumC15534gtD.YEAR.checkValidIntValue(this.year + j), this.month, this.day);
}
public final C15520gsp plusMonths(long j) {
if (j == 0) {
return this;
}
long j2 = (this.year * 12) + (this.month - 1) + j;
return resolvePreviousValid(EnumC15534gtD.YEAR.checkValidIntValue(gtG.floorDiv(j2, 12L)), gtG.floorMod(j2, 12) + 1, this.day);
}
public final C15520gsp plusWeeks(long j) {
return plusDays(gtG.safeMultiply(j, 7));
}
public final C15520gsp plusDays(long j) {
return j == 0 ? this : ofEpochDay(gtG.safeAdd(toEpochDay(), j));
}
@Override // o.gsJ, o.AbstractC15535gtF, o.InterfaceC15536gtL
public final C15520gsp minus(gtN gtn) {
return (C15520gsp) gtn.subtractFrom(this);
}
@Override // o.gsJ, o.AbstractC15535gtF, o.InterfaceC15536gtL
public final C15520gsp minus(long j, InterfaceC15539gtV interfaceC15539gtV) {
return j == Long.MIN_VALUE ? plus(Long.MAX_VALUE, interfaceC15539gtV).plus(1L, interfaceC15539gtV) : plus(-j, interfaceC15539gtV);
}
public final C15520gsp minusYears(long j) {
return j == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1L) : plusYears(-j);
}
public final C15520gsp minusMonths(long j) {
return j == Long.MIN_VALUE ? plusMonths(Long.MAX_VALUE).plusMonths(1L) : plusMonths(-j);
}
public final C15520gsp minusWeeks(long j) {
return j == Long.MIN_VALUE ? plusWeeks(Long.MAX_VALUE).plusWeeks(1L) : plusWeeks(-j);
}
public final C15520gsp minusDays(long j) {
return j == Long.MIN_VALUE ? plusDays(Long.MAX_VALUE).plusDays(1L) : plusDays(-j);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // o.gsJ, o.gtE, o.gtK
public final <R> R query(gtQ<R> gtq) {
return gtq == gtM.localDate() ? this : (R) super.query(gtq);
}
@Override // o.gsJ, o.gtJ
public final InterfaceC15536gtL adjustInto(InterfaceC15536gtL interfaceC15536gtL) {
return super.adjustInto(interfaceC15536gtL);
}
@Override // o.InterfaceC15536gtL
public final long until(InterfaceC15536gtL interfaceC15536gtL, InterfaceC15539gtV interfaceC15539gtV) {
C15520gsp from = from((gtK) interfaceC15536gtL);
if (interfaceC15539gtV instanceof gtH) {
switch (AnonymousClass1.$SwitchMap$org$threeten$bp$temporal$ChronoUnit[((gtH) interfaceC15539gtV).ordinal()]) {
case 1:
return daysUntil(from);
case 2:
return daysUntil(from) / 7;
case 3:
return monthsUntil(from);
case 4:
return monthsUntil(from) / 12;
case 5:
return monthsUntil(from) / 120;
case 6:
return monthsUntil(from) / 1200;
case 7:
return monthsUntil(from) / 12000;
case 8:
return from.getLong(EnumC15534gtD.ERA) - getLong(EnumC15534gtD.ERA);
default:
throw new UnsupportedTemporalTypeException("Unsupported unit: ".concat(String.valueOf(interfaceC15539gtV)));
}
}
return interfaceC15539gtV.between(this, from);
}
/* JADX INFO: Access modifiers changed from: package-private */
public final long daysUntil(C15520gsp c15520gsp) {
return c15520gsp.toEpochDay() - toEpochDay();
}
private long monthsUntil(C15520gsp c15520gsp) {
long prolepticMonth = getProlepticMonth();
return (((c15520gsp.getProlepticMonth() << 5) + c15520gsp.getDayOfMonth()) - ((prolepticMonth << 5) + getDayOfMonth())) / 32;
}
@Override // o.gsJ
public final C15500gsA until(gsJ gsj) {
C15520gsp from = from((gtK) gsj);
long prolepticMonth = from.getProlepticMonth() - getProlepticMonth();
int i = from.day - this.day;
if (prolepticMonth > 0 && i < 0) {
prolepticMonth--;
i = (int) (from.toEpochDay() - plusMonths(prolepticMonth).toEpochDay());
} else if (prolepticMonth < 0 && i > 0) {
prolepticMonth++;
i -= from.lengthOfMonth();
}
return C15500gsA.of(gtG.safeToInt(prolepticMonth / 12), (int) (prolepticMonth % 12), i);
}
@Override // o.gsJ
public final C15522gsr atTime(C15521gsq c15521gsq) {
return C15522gsr.of(this, c15521gsq);
}
public final C15522gsr atTime(int i, int i2) {
return atTime(C15521gsq.of(i, i2));
}
public final C15522gsr atTime(int i, int i2, int i3) {
return atTime(C15521gsq.of(i, i2, i3));
}
public final C15522gsr atTime(int i, int i2, int i3, int i4) {
return atTime(C15521gsq.of(i, i2, i3, i4));
}
public final OffsetDateTime atTime(C15524gst c15524gst) {
return OffsetDateTime.of(C15522gsr.of(this, c15524gst.toLocalTime()), c15524gst.getOffset());
}
public final C15522gsr atStartOfDay() {
return C15522gsr.of(this, C15521gsq.MIDNIGHT);
}
public final gsN atStartOfDay(AbstractC15502gsH abstractC15502gsH) {
gtW transition;
gtG.requireNonNull(abstractC15502gsH, "zone");
C15522gsr atTime = atTime(C15521gsq.MIDNIGHT);
if (!(abstractC15502gsH instanceof gsI) && (transition = abstractC15502gsH.getRules().getTransition(atTime)) != null && transition.isGap()) {
atTime = transition.getDateTimeAfter();
}
return gsN.of(atTime, abstractC15502gsH);
}
@Override // o.gsJ
public final long toEpochDay() {
long j;
long j2 = this.year;
long j3 = this.month;
long j4 = 365 * j2;
if (j2 >= 0) {
j = j4 + (((3 + j2) / 4) - ((99 + j2) / 100)) + ((j2 + 399) / 400);
} else {
j = j4 - (((j2 / (-4)) - (j2 / (-100))) + (j2 / (-400)));
}
long j5 = j + (((367 * j3) - 362) / 12) + (this.day - 1);
if (j3 > 2) {
j5 -= isLeapYear() ? 1L : 2L;
}
return j5 - DAYS_0000_TO_1970;
}
@Override // o.gsJ
public final int compareTo(gsJ gsj) {
if (gsj instanceof C15520gsp) {
return compareTo0((C15520gsp) gsj);
}
return super.compareTo(gsj);
}
/* JADX INFO: Access modifiers changed from: package-private */
public final int compareTo0(C15520gsp c15520gsp) {
int i = this.year - c15520gsp.year;
if (i != 0) {
return i;
}
int i2 = this.month - c15520gsp.month;
return i2 == 0 ? this.day - c15520gsp.day : i2;
}
@Override // o.gsJ
public final boolean isAfter(gsJ gsj) {
if (gsj instanceof C15520gsp) {
return compareTo0((C15520gsp) gsj) > 0;
}
return super.isAfter(gsj);
}
@Override // o.gsJ
public final boolean isBefore(gsJ gsj) {
if (gsj instanceof C15520gsp) {
return compareTo0((C15520gsp) gsj) < 0;
}
return super.isBefore(gsj);
}
@Override // o.gsJ
public final boolean isEqual(gsJ gsj) {
if (gsj instanceof C15520gsp) {
return compareTo0((C15520gsp) gsj) == 0;
}
return super.isEqual(gsj);
}
@Override // o.gsJ
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof C15520gsp) && compareTo0((C15520gsp) obj) == 0;
}
@Override // o.gsJ
public final String toString() {
int i = this.year;
short s = this.month;
short s2 = this.day;
int abs = Math.abs(i);
StringBuilder sb = new StringBuilder(10);
if (abs >= 1000) {
if (i > 9999) {
sb.append('+');
}
sb.append(i);
} else if (i < 0) {
sb.append(i - 10000);
sb.deleteCharAt(1);
} else {
sb.append(i + HwBuildEx.VersionCodes.CUR_DEVELOPMENT);
sb.deleteCharAt(0);
}
sb.append(s < 10 ? "-0" : "-");
sb.append((int) s);
sb.append(s2 < 10 ? "-0" : "-");
sb.append((int) s2);
return sb.toString();
}
@Override // o.gsJ
public final String format(C15554gto c15554gto) {
return super.format(c15554gto);
}
private Object writeReplace() {
return new C15501gsD((byte) 3, this);
}
private Object readResolve() throws ObjectStreamException {
throw new InvalidObjectException("Deserialization via serialization delegate");
}
/* JADX INFO: Access modifiers changed from: package-private */
public final void writeExternal(DataOutput dataOutput) throws IOException {
dataOutput.writeInt(this.year);
dataOutput.writeByte(this.month);
dataOutput.writeByte(this.day);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static C15520gsp readExternal(DataInput dataInput) throws IOException {
return of(dataInput.readInt(), dataInput.readByte(), dataInput.readByte());
}
public /* synthetic */ C15520gsp() {
}
@Override // o.gsJ
public final int hashCode() {
int i = this.year;
return (i & (-2048)) ^ (((i << 11) + (this.month << 6)) + this.day);
}
public final int getYear() {
return this.year;
}
public final int getMonthValue() {
return this.month;
}
public final int getDayOfMonth() {
return this.day;
}
private long getProlepticMonth() {
return (this.year * 12) + (this.month - 1);
}
}