JulianChronology.java
4.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
package org.joda.time.chrono;
import java.util.HashMap;
import java.util.Map;
import org.joda.time.Chronology;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DateTimeZone;
import org.joda.time.IllegalFieldValueException;
import org.joda.time.field.SkipDateTimeField;
import uk;
public final class JulianChronology
extends uk
{
private static final JulianChronology a = getInstance(DateTimeZone.UTC);
private static final Map<DateTimeZone, JulianChronology[]> b = new HashMap();
private static final long serialVersionUID = -8731039522547897247L;
private JulianChronology(Chronology paramChronology, int paramInt)
{
super(paramChronology, paramInt);
}
public static JulianChronology getInstance()
{
return getInstance(DateTimeZone.getDefault(), 4);
}
public static JulianChronology getInstance(DateTimeZone paramDateTimeZone)
{
return getInstance(paramDateTimeZone, 4);
}
public static JulianChronology getInstance(DateTimeZone paramDateTimeZone, int paramInt)
{
DateTimeZone localDateTimeZone = paramDateTimeZone;
if (paramDateTimeZone == null) {
localDateTimeZone = DateTimeZone.getDefault();
}
for (;;)
{
Object localObject1;
synchronized (b)
{
paramDateTimeZone = (JulianChronology[])b.get(localDateTimeZone);
localObject1 = paramDateTimeZone;
if (paramDateTimeZone == null)
{
localObject1 = new JulianChronology[7];
b.put(localDateTimeZone, localObject1);
}
Object localObject2 = localObject1[(paramInt - 1)];
paramDateTimeZone = (DateTimeZone)localObject2;
if (localObject2 == null)
{
if (localDateTimeZone == DateTimeZone.UTC)
{
paramDateTimeZone = new JulianChronology(null, paramInt);
break label120;
}
}
else {
return paramDateTimeZone;
}
}
paramDateTimeZone = new JulianChronology(ZonedChronology.getInstance(getInstance(DateTimeZone.UTC, paramInt), localDateTimeZone), paramInt);
label120:
localObject1[(paramInt - 1)] = paramDateTimeZone;
}
}
public static JulianChronology getInstanceUTC()
{
return a;
}
private Object readResolve()
{
Chronology localChronology = getBase();
int j = getMinimumDaysInFirstWeek();
int i = j;
if (j == 0) {
i = 4;
}
if (localChronology == null) {
return getInstance(DateTimeZone.UTC, i);
}
return getInstance(localChronology.getZone(), i);
}
protected final void assemble(AssembledChronology.Fields paramFields)
{
if (getBase() == null)
{
super.assemble(paramFields);
paramFields.year = new SkipDateTimeField(this, paramFields.year);
paramFields.weekyear = new SkipDateTimeField(this, paramFields.weekyear);
}
}
final long b(int paramInt1, int paramInt2, int paramInt3)
throws IllegalArgumentException
{
int i = paramInt1;
if (paramInt1 <= 0)
{
if (paramInt1 == 0) {
throw new IllegalFieldValueException(DateTimeFieldType.year(), Integer.valueOf(paramInt1), null, null);
}
i = paramInt1 + 1;
}
return super.b(i, paramInt2, paramInt3);
}
final int c()
{
return -292269054;
}
final int d()
{
return 292272992;
}
final boolean d(int paramInt)
{
return (paramInt & 0x3) == 0;
}
final long f()
{
return 31557600000L;
}
final long f(int paramInt)
{
int k = paramInt - 1968;
int i;
if (k <= 0) {
i = k + 3 >> 2;
}
for (;;)
{
long l = k;
return (i + l * 365L) * 86400000L - 62035200000L;
int j = k >> 2;
i = j;
if (!d(paramInt)) {
i = j + 1;
}
}
}
final long g()
{
return 15778800000L;
}
final long h()
{
return 2629800000L;
}
final long i()
{
return 31083663600000L;
}
public final Chronology withUTC()
{
return a;
}
public final Chronology withZone(DateTimeZone paramDateTimeZone)
{
DateTimeZone localDateTimeZone = paramDateTimeZone;
if (paramDateTimeZone == null) {
localDateTimeZone = DateTimeZone.getDefault();
}
if (localDateTimeZone == getZone()) {
return this;
}
return getInstance(localDateTimeZone);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/org/joda/time/chrono/JulianChronology.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/