285 lines
14 KiB
Java
285 lines
14 KiB
Java
package o;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import org.threeten.bp.DateTimeException;
|
|
|
|
/* renamed from: o.gte, reason: case insensitive filesystem */
|
|
/* loaded from: classes6.dex */
|
|
public final class C15544gte extends gsR implements Serializable {
|
|
public static final C15544gte INSTANCE = new C15544gte();
|
|
static final int YEARS_DIFFERENCE = 1911;
|
|
private static final long serialVersionUID = 1039765215346859963L;
|
|
|
|
@Override // o.gsR
|
|
public final /* bridge */ /* synthetic */ gsJ resolveDate(Map map, gtA gta) {
|
|
return resolveDate((Map<InterfaceC15537gtP, Long>) map, gta);
|
|
}
|
|
|
|
private C15544gte() {
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final C15547gth date(gsY gsy, int i, int i2, int i3) {
|
|
return (C15547gth) super.date(gsy, i, i2, i3);
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final C15547gth date(int i, int i2, int i3) {
|
|
return new C15547gth(C15520gsp.of(i + YEARS_DIFFERENCE, i2, i3));
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final C15547gth dateYearDay(gsY gsy, int i, int i2) {
|
|
return (C15547gth) super.dateYearDay(gsy, i, i2);
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final C15547gth dateYearDay(int i, int i2) {
|
|
return new C15547gth(C15520gsp.ofYearDay(i + YEARS_DIFFERENCE, i2));
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final C15547gth dateEpochDay(long j) {
|
|
return new C15547gth(C15520gsp.ofEpochDay(j));
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final C15547gth date(gtK gtk) {
|
|
if (gtk instanceof C15547gth) {
|
|
return (C15547gth) gtk;
|
|
}
|
|
return new C15547gth(C15520gsp.from(gtk));
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final gsO<C15547gth> localDateTime(gtK gtk) {
|
|
return super.localDateTime(gtk);
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final gsS<C15547gth> zonedDateTime(gtK gtk) {
|
|
return super.zonedDateTime(gtk);
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final gsS<C15547gth> zonedDateTime(C15523gss c15523gss, AbstractC15502gsH abstractC15502gsH) {
|
|
return super.zonedDateTime(c15523gss, abstractC15502gsH);
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final C15547gth dateNow() {
|
|
return (C15547gth) super.dateNow();
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final C15547gth dateNow(AbstractC15502gsH abstractC15502gsH) {
|
|
return (C15547gth) super.dateNow(abstractC15502gsH);
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final C15547gth dateNow(AbstractC15514gsj abstractC15514gsj) {
|
|
gtG.requireNonNull(abstractC15514gsj, "clock");
|
|
return (C15547gth) super.dateNow(abstractC15514gsj);
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final boolean isLeapYear(long j) {
|
|
return gsV.INSTANCE.isLeapYear(j + 1911);
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final int prolepticYear(gsY gsy, int i) {
|
|
if (gsy instanceof EnumC15546gtg) {
|
|
return gsy != EnumC15546gtg.ROC ? 1 - i : i;
|
|
}
|
|
throw new ClassCastException("Era must be MinguoEra");
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final EnumC15546gtg eraOf(int i) {
|
|
return EnumC15546gtg.of(i);
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final List<gsY> eras() {
|
|
return Arrays.asList(EnumC15546gtg.values());
|
|
}
|
|
|
|
/* renamed from: o.gte$4, reason: invalid class name */
|
|
/* loaded from: classes6.dex */
|
|
static /* synthetic */ class AnonymousClass4 {
|
|
static final int[] $SwitchMap$org$threeten$bp$temporal$ChronoField;
|
|
|
|
static {
|
|
int[] iArr = new int[EnumC15534gtD.values().length];
|
|
$SwitchMap$org$threeten$bp$temporal$ChronoField = iArr;
|
|
try {
|
|
iArr[EnumC15534gtD.PROLEPTIC_MONTH.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.YEAR_OF_ERA.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.YEAR.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final gtT range(EnumC15534gtD enumC15534gtD) {
|
|
int i = AnonymousClass4.$SwitchMap$org$threeten$bp$temporal$ChronoField[enumC15534gtD.ordinal()];
|
|
if (i == 1) {
|
|
gtT range = EnumC15534gtD.PROLEPTIC_MONTH.range();
|
|
return gtT.of(range.getMinimum() - 22932, range.getMaximum() - 22932);
|
|
}
|
|
if (i == 2) {
|
|
gtT range2 = EnumC15534gtD.YEAR.range();
|
|
return gtT.of(1L, range2.getMaximum() - 1911, (-range2.getMinimum()) + 1912);
|
|
}
|
|
if (i == 3) {
|
|
gtT range3 = EnumC15534gtD.YEAR.range();
|
|
return gtT.of(range3.getMinimum() - 1911, range3.getMaximum() - 1911);
|
|
}
|
|
return enumC15534gtD.range();
|
|
}
|
|
|
|
/* JADX WARN: Type inference failed for: r11v20, types: [o.gtE, o.gth] */
|
|
/* JADX WARN: Type inference failed for: r11v35, types: [o.gth] */
|
|
/* JADX WARN: Type inference failed for: r11v71, types: [o.gth] */
|
|
@Override // o.gsR
|
|
public final C15547gth resolveDate(Map<InterfaceC15537gtP, Long> map, gtA gta) {
|
|
if (map.containsKey(EnumC15534gtD.EPOCH_DAY)) {
|
|
return dateEpochDay(map.remove(EnumC15534gtD.EPOCH_DAY).longValue());
|
|
}
|
|
Long remove = map.remove(EnumC15534gtD.PROLEPTIC_MONTH);
|
|
if (remove != null) {
|
|
if (gta != gtA.LENIENT) {
|
|
EnumC15534gtD.PROLEPTIC_MONTH.checkValidValue(remove.longValue());
|
|
}
|
|
updateResolveMap(map, EnumC15534gtD.MONTH_OF_YEAR, gtG.floorMod(remove.longValue(), 12) + 1);
|
|
updateResolveMap(map, EnumC15534gtD.YEAR, gtG.floorDiv(remove.longValue(), 12L));
|
|
}
|
|
Long remove2 = map.remove(EnumC15534gtD.YEAR_OF_ERA);
|
|
if (remove2 != null) {
|
|
if (gta != gtA.LENIENT) {
|
|
EnumC15534gtD.YEAR_OF_ERA.checkValidValue(remove2.longValue());
|
|
}
|
|
Long remove3 = map.remove(EnumC15534gtD.ERA);
|
|
if (remove3 == null) {
|
|
Long l = map.get(EnumC15534gtD.YEAR);
|
|
if (gta != gtA.STRICT) {
|
|
updateResolveMap(map, EnumC15534gtD.YEAR, (l == null || l.longValue() > 0) ? remove2.longValue() : gtG.safeSubtract(1L, remove2.longValue()));
|
|
} else if (l != null) {
|
|
updateResolveMap(map, EnumC15534gtD.YEAR, l.longValue() > 0 ? remove2.longValue() : gtG.safeSubtract(1L, remove2.longValue()));
|
|
} else {
|
|
map.put(EnumC15534gtD.YEAR_OF_ERA, remove2);
|
|
}
|
|
} else if (remove3.longValue() == 1) {
|
|
updateResolveMap(map, EnumC15534gtD.YEAR, remove2.longValue());
|
|
} else if (remove3.longValue() == 0) {
|
|
updateResolveMap(map, EnumC15534gtD.YEAR, gtG.safeSubtract(1L, remove2.longValue()));
|
|
} else {
|
|
throw new DateTimeException("Invalid value for era: ".concat(String.valueOf(remove3)));
|
|
}
|
|
} else if (map.containsKey(EnumC15534gtD.ERA)) {
|
|
EnumC15534gtD.ERA.checkValidValue(map.get(EnumC15534gtD.ERA).longValue());
|
|
}
|
|
if (!map.containsKey(EnumC15534gtD.YEAR)) {
|
|
return null;
|
|
}
|
|
if (map.containsKey(EnumC15534gtD.MONTH_OF_YEAR)) {
|
|
if (map.containsKey(EnumC15534gtD.DAY_OF_MONTH)) {
|
|
int checkValidIntValue = EnumC15534gtD.YEAR.checkValidIntValue(map.remove(EnumC15534gtD.YEAR).longValue());
|
|
if (gta == gtA.LENIENT) {
|
|
return date(checkValidIntValue, 1, 1).plusMonths(gtG.safeSubtract(map.remove(EnumC15534gtD.MONTH_OF_YEAR).longValue(), 1L)).plusDays(gtG.safeSubtract(map.remove(EnumC15534gtD.DAY_OF_MONTH).longValue(), 1L));
|
|
}
|
|
int checkValidIntValue2 = range(EnumC15534gtD.MONTH_OF_YEAR).checkValidIntValue(map.remove(EnumC15534gtD.MONTH_OF_YEAR).longValue(), EnumC15534gtD.MONTH_OF_YEAR);
|
|
int checkValidIntValue3 = range(EnumC15534gtD.DAY_OF_MONTH).checkValidIntValue(map.remove(EnumC15534gtD.DAY_OF_MONTH).longValue(), EnumC15534gtD.DAY_OF_MONTH);
|
|
if (gta == gtA.SMART && checkValidIntValue3 > 28) {
|
|
checkValidIntValue3 = Math.min(checkValidIntValue3, date(checkValidIntValue, checkValidIntValue2, 1).lengthOfMonth());
|
|
}
|
|
return date(checkValidIntValue, checkValidIntValue2, checkValidIntValue3);
|
|
}
|
|
if (map.containsKey(EnumC15534gtD.ALIGNED_WEEK_OF_MONTH)) {
|
|
if (map.containsKey(EnumC15534gtD.ALIGNED_DAY_OF_WEEK_IN_MONTH)) {
|
|
int checkValidIntValue4 = EnumC15534gtD.YEAR.checkValidIntValue(map.remove(EnumC15534gtD.YEAR).longValue());
|
|
if (gta == gtA.LENIENT) {
|
|
return date(checkValidIntValue4, 1, 1).plus(gtG.safeSubtract(map.remove(EnumC15534gtD.MONTH_OF_YEAR).longValue(), 1L), (InterfaceC15539gtV) gtH.MONTHS).plus(gtG.safeSubtract(map.remove(EnumC15534gtD.ALIGNED_WEEK_OF_MONTH).longValue(), 1L), (InterfaceC15539gtV) gtH.WEEKS).plus(gtG.safeSubtract(map.remove(EnumC15534gtD.ALIGNED_DAY_OF_WEEK_IN_MONTH).longValue(), 1L), (InterfaceC15539gtV) gtH.DAYS);
|
|
}
|
|
int checkValidIntValue5 = EnumC15534gtD.MONTH_OF_YEAR.checkValidIntValue(map.remove(EnumC15534gtD.MONTH_OF_YEAR).longValue());
|
|
C15547gth plus = date(checkValidIntValue4, checkValidIntValue5, 1).plus(((EnumC15534gtD.ALIGNED_WEEK_OF_MONTH.checkValidIntValue(map.remove(EnumC15534gtD.ALIGNED_WEEK_OF_MONTH).longValue()) - 1) * 7) + (EnumC15534gtD.ALIGNED_DAY_OF_WEEK_IN_MONTH.checkValidIntValue(map.remove(EnumC15534gtD.ALIGNED_DAY_OF_WEEK_IN_MONTH).longValue()) - 1), (InterfaceC15539gtV) gtH.DAYS);
|
|
if (gta != gtA.STRICT || plus.get(EnumC15534gtD.MONTH_OF_YEAR) == checkValidIntValue5) {
|
|
return plus;
|
|
}
|
|
throw new DateTimeException("Strict mode rejected date parsed to a different month");
|
|
}
|
|
if (map.containsKey(EnumC15534gtD.DAY_OF_WEEK)) {
|
|
int checkValidIntValue6 = EnumC15534gtD.YEAR.checkValidIntValue(map.remove(EnumC15534gtD.YEAR).longValue());
|
|
if (gta == gtA.LENIENT) {
|
|
return date(checkValidIntValue6, 1, 1).plus(gtG.safeSubtract(map.remove(EnumC15534gtD.MONTH_OF_YEAR).longValue(), 1L), (InterfaceC15539gtV) gtH.MONTHS).plus(gtG.safeSubtract(map.remove(EnumC15534gtD.ALIGNED_WEEK_OF_MONTH).longValue(), 1L), (InterfaceC15539gtV) gtH.WEEKS).plus(gtG.safeSubtract(map.remove(EnumC15534gtD.DAY_OF_WEEK).longValue(), 1L), (InterfaceC15539gtV) gtH.DAYS);
|
|
}
|
|
int checkValidIntValue7 = EnumC15534gtD.MONTH_OF_YEAR.checkValidIntValue(map.remove(EnumC15534gtD.MONTH_OF_YEAR).longValue());
|
|
C15547gth with = date(checkValidIntValue6, checkValidIntValue7, 1).plus(EnumC15534gtD.ALIGNED_WEEK_OF_MONTH.checkValidIntValue(map.remove(EnumC15534gtD.ALIGNED_WEEK_OF_MONTH).longValue()) - 1, (InterfaceC15539gtV) gtH.WEEKS).with(gtO.nextOrSame(EnumC15515gsk.of(EnumC15534gtD.DAY_OF_WEEK.checkValidIntValue(map.remove(EnumC15534gtD.DAY_OF_WEEK).longValue()))));
|
|
if (gta != gtA.STRICT || with.get(EnumC15534gtD.MONTH_OF_YEAR) == checkValidIntValue7) {
|
|
return with;
|
|
}
|
|
throw new DateTimeException("Strict mode rejected date parsed to a different month");
|
|
}
|
|
}
|
|
}
|
|
if (map.containsKey(EnumC15534gtD.DAY_OF_YEAR)) {
|
|
int checkValidIntValue8 = EnumC15534gtD.YEAR.checkValidIntValue(map.remove(EnumC15534gtD.YEAR).longValue());
|
|
if (gta == gtA.LENIENT) {
|
|
return dateYearDay(checkValidIntValue8, 1).plusDays(gtG.safeSubtract(map.remove(EnumC15534gtD.DAY_OF_YEAR).longValue(), 1L));
|
|
}
|
|
return dateYearDay(checkValidIntValue8, EnumC15534gtD.DAY_OF_YEAR.checkValidIntValue(map.remove(EnumC15534gtD.DAY_OF_YEAR).longValue()));
|
|
}
|
|
if (!map.containsKey(EnumC15534gtD.ALIGNED_WEEK_OF_YEAR)) {
|
|
return null;
|
|
}
|
|
if (map.containsKey(EnumC15534gtD.ALIGNED_DAY_OF_WEEK_IN_YEAR)) {
|
|
int checkValidIntValue9 = EnumC15534gtD.YEAR.checkValidIntValue(map.remove(EnumC15534gtD.YEAR).longValue());
|
|
if (gta == gtA.LENIENT) {
|
|
return date(checkValidIntValue9, 1, 1).plus(gtG.safeSubtract(map.remove(EnumC15534gtD.ALIGNED_WEEK_OF_YEAR).longValue(), 1L), (InterfaceC15539gtV) gtH.WEEKS).plus(gtG.safeSubtract(map.remove(EnumC15534gtD.ALIGNED_DAY_OF_WEEK_IN_YEAR).longValue(), 1L), (InterfaceC15539gtV) gtH.DAYS);
|
|
}
|
|
?? plusDays = date(checkValidIntValue9, 1, 1).plusDays(((EnumC15534gtD.ALIGNED_WEEK_OF_YEAR.checkValidIntValue(map.remove(EnumC15534gtD.ALIGNED_WEEK_OF_YEAR).longValue()) - 1) * 7) + (EnumC15534gtD.ALIGNED_DAY_OF_WEEK_IN_YEAR.checkValidIntValue(map.remove(EnumC15534gtD.ALIGNED_DAY_OF_WEEK_IN_YEAR).longValue()) - 1));
|
|
if (gta != gtA.STRICT || plusDays.get(EnumC15534gtD.YEAR) == checkValidIntValue9) {
|
|
return plusDays;
|
|
}
|
|
throw new DateTimeException("Strict mode rejected date parsed to a different year");
|
|
}
|
|
if (!map.containsKey(EnumC15534gtD.DAY_OF_WEEK)) {
|
|
return null;
|
|
}
|
|
int checkValidIntValue10 = EnumC15534gtD.YEAR.checkValidIntValue(map.remove(EnumC15534gtD.YEAR).longValue());
|
|
if (gta == gtA.LENIENT) {
|
|
return date(checkValidIntValue10, 1, 1).plus(gtG.safeSubtract(map.remove(EnumC15534gtD.ALIGNED_WEEK_OF_YEAR).longValue(), 1L), (InterfaceC15539gtV) gtH.WEEKS).plus(gtG.safeSubtract(map.remove(EnumC15534gtD.DAY_OF_WEEK).longValue(), 1L), (InterfaceC15539gtV) gtH.DAYS);
|
|
}
|
|
C15547gth with2 = date(checkValidIntValue10, 1, 1).plus(EnumC15534gtD.ALIGNED_WEEK_OF_YEAR.checkValidIntValue(map.remove(EnumC15534gtD.ALIGNED_WEEK_OF_YEAR).longValue()) - 1, (InterfaceC15539gtV) gtH.WEEKS).with(gtO.nextOrSame(EnumC15515gsk.of(EnumC15534gtD.DAY_OF_WEEK.checkValidIntValue(map.remove(EnumC15534gtD.DAY_OF_WEEK).longValue()))));
|
|
if (gta != gtA.STRICT || with2.get(EnumC15534gtD.YEAR) == checkValidIntValue10) {
|
|
return with2;
|
|
}
|
|
throw new DateTimeException("Strict mode rejected date parsed to a different month");
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final String getId() {
|
|
return "Minguo";
|
|
}
|
|
|
|
@Override // o.gsR
|
|
public final String getCalendarType() {
|
|
return "roc";
|
|
}
|
|
|
|
private Object readResolve() {
|
|
return INSTANCE;
|
|
}
|
|
}
|