Home
last modified time | relevance | path

Searched refs:chrono (Results 1 – 25 of 138) sorted by relevance

123456

/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKChronoPeriod.java57 package tck.java.time.chrono;
72 import java.time.chrono.ChronoLocalDate;
73 import java.time.chrono.ChronoPeriod;
74 import java.time.chrono.Chronology;
75 import java.time.chrono.HijrahChronology;
76 import java.time.chrono.IsoChronology;
77 import java.time.chrono.JapaneseChronology;
78 import java.time.chrono.MinguoChronology;
79 import java.time.chrono.ThaiBuddhistChronology;
106 public void test_serialization(Chronology chrono) throws Exception { in test_serialization() argument
[all …]
DTCKChronology.java60 package tck.java.time.chrono;
83 import java.time.chrono.ChronoLocalDate;
84 import java.time.chrono.Chronology;
85 import java.time.chrono.Era;
86 import java.time.chrono.HijrahChronology;
87 import java.time.chrono.HijrahEra;
88 import java.time.chrono.IsoChronology;
89 import java.time.chrono.IsoEra;
90 import java.time.chrono.JapaneseChronology;
91 import java.time.chrono.JapaneseEra;
[all …]
DTCKChronoLocalDateTime.java57 package tck.java.time.chrono;
72 import java.time.chrono.ChronoLocalDateTime;
73 import java.time.chrono.Chronology;
74 import java.time.chrono.HijrahChronology;
75 import java.time.chrono.IsoChronology;
76 import java.time.chrono.JapaneseChronology;
77 import java.time.chrono.MinguoChronology;
78 import java.time.chrono.ThaiBuddhistChronology;
114 public void test_badWithAdjusterChrono(Chronology chrono) { in test_badWithAdjusterChrono() argument
116 ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON); in test_badWithAdjusterChrono()
[all …]
DTCKChronoLocalDate.java57 package tck.java.time.chrono;
71 import java.time.chrono.ChronoLocalDate;
72 import java.time.chrono.Chronology;
73 import java.time.chrono.HijrahChronology;
74 import java.time.chrono.IsoChronology;
75 import java.time.chrono.JapaneseChronology;
76 import java.time.chrono.MinguoChronology;
77 import java.time.chrono.ThaiBuddhistChronology;
114 public void test_badWithAdjusterChrono(Chronology chrono) { in test_badWithAdjusterChrono() argument
116 ChronoLocalDate date = chrono.date(refDate); in test_badWithAdjusterChrono()
[all …]
DTCKChronoZonedDateTime.java57 package tck.java.time.chrono;
73 import java.time.chrono.ChronoZonedDateTime;
74 import java.time.chrono.Chronology;
75 import java.time.chrono.HijrahChronology;
76 import java.time.chrono.IsoChronology;
77 import java.time.chrono.JapaneseChronology;
78 import java.time.chrono.MinguoChronology;
79 import java.time.chrono.ThaiBuddhistChronology;
116 public void test_badWithAdjusterChrono(Chronology chrono) { in test_badWithAdjusterChrono() argument
118 … ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); in test_badWithAdjusterChrono()
[all …]
DTCKTestServiceLoader.java59 package tck.java.time.chrono;
64 import java.time.chrono.ChronoLocalDate;
65 import java.time.chrono.Chronology;
78 Chronology chrono = Chronology.of("Coptic"); in test_TestServiceLoader() local
79 ChronoLocalDate copticDate = chrono.date(1729, 4, 27); in test_TestServiceLoader()
DTCKHijrahEra.java57 package tck.java.time.chrono;
63 import java.time.chrono.Era;
64 import java.time.chrono.HijrahChronology;
65 import java.time.chrono.HijrahEra;
DTCKMinguoEra.java57 package tck.java.time.chrono;
64 import java.time.chrono.Era;
65 import java.time.chrono.MinguoChronology;
66 import java.time.chrono.MinguoEra;
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/serial/
DTCKChronologySerialization.java57 package tck.java.time.chrono.serial;
62 import java.time.chrono.Chronology;
63 import java.time.chrono.HijrahChronology;
64 import java.time.chrono.IsoChronology;
65 import java.time.chrono.JapaneseChronology;
66 import java.time.chrono.MinguoChronology;
67 import java.time.chrono.ThaiBuddhistChronology;
96 public void test_chronoSerialization(Chronology chrono) throws Exception { in test_chronoSerialization() argument
97 assertSerializable(chrono); in test_chronoSerialization()
104 private void test_serializationBytes(Chronology chrono) throws Exception { in test_serializationBytes() argument
[all …]
DTCKChronoLocalDateTimeSerialization.java57 package tck.java.time.chrono.serial;
64 import java.time.chrono.ChronoLocalDateTime;
65 import java.time.chrono.Chronology;
66 import java.time.chrono.HijrahChronology;
67 import java.time.chrono.IsoChronology;
68 import java.time.chrono.JapaneseChronology;
69 import java.time.chrono.MinguoChronology;
70 import java.time.chrono.ThaiBuddhistChronology;
97 public void test_ChronoLocalDateTimeSerialization(Chronology chrono) throws Exception { in test_ChronoLocalDateTimeSerialization() argument
99 ChronoLocalDateTime<?> original = chrono.date(ref).atTime(ref.toLocalTime()); in test_ChronoLocalDateTimeSerialization()
DTCKChronoZonedDateTimeSerialization.java57 package tck.java.time.chrono.serial;
62 import java.time.chrono.ChronoZonedDateTime;
63 import java.time.chrono.Chronology;
64 import java.time.chrono.HijrahChronology;
65 import java.time.chrono.IsoChronology;
66 import java.time.chrono.JapaneseChronology;
67 import java.time.chrono.MinguoChronology;
68 import java.time.chrono.ThaiBuddhistChronology;
97 public void test_ChronoZonedDateTimeSerialization(Chronology chrono) throws Exception { in test_ChronoZonedDateTimeSerialization() argument
99 …ChronoZonedDateTime<?> original = chrono.date(ref).atTime(ref.toLocalTime()).atZone(ref.getZone()); in test_ChronoZonedDateTimeSerialization()
DTCKEraSerialization.java60 package tck.java.time.chrono.serial;
70 import java.time.chrono.ChronoLocalDate;
71 import java.time.chrono.Era;
72 import java.time.chrono.HijrahEra;
73 import java.time.chrono.IsoEra;
74 import java.time.chrono.JapaneseEra;
75 import java.time.chrono.MinguoEra;
76 import java.time.chrono.ThaiBuddhistEra;
DTCKCopticSerialization.java60 package tck.java.time.chrono.serial;
63 import java.time.chrono.ChronoLocalDate;
64 import java.time.chrono.Chronology;
77 Chronology chrono = Chronology.of("Coptic"); in test_eraSerialization() local
78 ChronoLocalDate copticDate = chrono.date(1729, 4, 27); in test_eraSerialization()
DTCKChronoLocalDateSerialization.java57 package tck.java.time.chrono.serial;
66 import java.time.chrono.ChronoLocalDate;
67 import java.time.chrono.HijrahChronology;
68 import java.time.chrono.HijrahDate;
69 import java.time.chrono.JapaneseDate;
70 import java.time.chrono.JapaneseEra;
71 import java.time.chrono.MinguoDate;
72 import java.time.chrono.ThaiBuddhistDate;
135 HijrahChronology chrono = HijrahChronology.INSTANCE; in test_hijrahSerialization_format() local
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestExampleCode.java58 package test.java.time.chrono;
65 import java.time.chrono.ChronoLocalDate;
66 import java.time.chrono.ChronoLocalDateTime;
67 import java.time.chrono.ChronoZonedDateTime;
68 import java.time.chrono.Chronology;
69 import java.time.chrono.HijrahChronology;
70 import java.time.chrono.HijrahDate;
71 import java.time.chrono.ThaiBuddhistDate;
99 for (Chronology chrono : chronos) { in test_chronoPackageExample()
100 ChronoLocalDate date = chrono.dateNow(); in test_chronoPackageExample()
[all …]
DTestChronoLocalDate.java57 package test.java.time.chrono;
64 import java.time.chrono.ChronoLocalDate;
65 import java.time.chrono.ChronoLocalDateTime;
66 import java.time.chrono.Chronology;
67 import java.time.chrono.ThaiBuddhistChronology;
68 import java.time.chrono.ThaiBuddhistDate;
134 Chronology chrono = ThaiBuddhistChronology.INSTANCE;
135 ChronoLocalDate date = chrono.dateNow();
144 ThaiBuddhistChronology chrono = ThaiBuddhistChronology.INSTANCE;
145 ThaiBuddhistDate date = chrono.dateNow();
[all …]
DTestServiceLoader.java59 package test.java.time.chrono;
63 import java.time.chrono.Chronology;
84 for (Chronology chrono : loader) { in test_copticServiceLoader()
85 chronos.put(chrono.getId(), chrono); in test_copticServiceLoader() local
DTestChronologyPerf.java25 package test.java.time.chrono;
28 import java.time.chrono.Chronology;
29 import java.time.chrono.HijrahChronology;
30 import java.time.chrono.HijrahDate;
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoPeriodImpl.java57 package java.time.chrono;
113 private final Chronology chrono; field in ChronoPeriodImpl
130 ChronoPeriodImpl(Chronology chrono, int years, int months, int days) { in ChronoPeriodImpl() argument
131 Objects.requireNonNull(chrono, "chrono"); in ChronoPeriodImpl()
132 this.chrono = chrono; in ChronoPeriodImpl()
159 return chrono; in getChronology()
178 chrono, in plus()
188 chrono, in minus()
205 if (!(chrono.equals(period.getChronology()))) { in validateAmount()
206 …throw new ClassCastException("Chronology mismatch, expected: " + chrono.getId() + ", actual: " + p… in validateAmount()
[all …]
DHijrahDate.java57 package java.time.chrono;
125 private final transient HijrahChronology chrono; field in HijrahDate
150 …static HijrahDate of(HijrahChronology chrono, int prolepticYear, int monthOfYear, int dayOfMonth) { in of() argument
151 return new HijrahDate(chrono, prolepticYear, monthOfYear, dayOfMonth); in of()
160 static HijrahDate ofEpochDay(HijrahChronology chrono, long epochDay) { in ofEpochDay() argument
161 return new HijrahDate(chrono, epochDay); in ofEpochDay()
263 … private HijrahDate(HijrahChronology chrono, int prolepticYear, int monthOfYear, int dayOfMonth) { in HijrahDate() argument
265 chrono.getEpochDay(prolepticYear, monthOfYear, dayOfMonth); in HijrahDate()
267 this.chrono = chrono; in HijrahDate()
278 private HijrahDate(HijrahChronology chrono, long epochDay) { in HijrahDate() argument
[all …]
DAbstractChronology.java62 package java.time.chrono;
146 static Chronology registerChrono(Chronology chrono) { in registerChrono() argument
147 return registerChrono(chrono, chrono.getId()); in registerChrono()
159 static Chronology registerChrono(Chronology chrono, String id) { in registerChrono() argument
160 Chronology prev = CHRONOS_BY_ID.putIfAbsent(id, chrono); in registerChrono()
162 String type = chrono.getCalendarType(); in registerChrono()
164 CHRONOS_BY_TYPE.putIfAbsent(type, chrono); in registerChrono()
198 for (AbstractChronology chrono : loader) { in initCache()
199 String id = chrono.getId(); in initCache()
200 if (id.equals("ISO") || registerChrono(chrono) != null) { in initCache()
[all …]
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestNonIsoFormatter.java41 import java.time.chrono.ChronoLocalDate;
42 import java.time.chrono.Chronology;
43 import java.time.chrono.HijrahChronology;
44 import java.time.chrono.IsoChronology;
45 import java.time.chrono.JapaneseChronology;
46 import java.time.chrono.MinguoChronology;
47 import java.time.chrono.ThaiBuddhistChronology;
157 …public void test_formatLocalizedDate(Chronology chrono, Locale formatLocale, Locale numberingLocal… in test_formatLocalizedDate() argument
160 .withChronology(chrono).withLocale(formatLocale) in test_formatLocalizedDate()
167 …public void test_parseLocalizedText(Chronology chrono, Locale formatLocale, Locale numberingLocale, in test_parseLocalizedText() argument
[all …]
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeParseContext.java65 import java.time.chrono.Chronology;
66 import java.time.chrono.IsoChronology;
167 Chronology chrono = currentParsed().chrono; in getEffectiveChronology() local
168 if (chrono == null) { in getEffectiveChronology()
169 chrono = formatter.getChronology(); in getEffectiveChronology()
170 if (chrono == null) { in getEffectiveChronology()
171 chrono = IsoChronology.INSTANCE; in getEffectiveChronology()
174 return chrono; in getEffectiveChronology()
329 parsed.chrono = getEffectiveChronology(); in toResolved()
381 void setParsed(Chronology chrono) { in setParsed() argument
[all …]
/libcore/luni/src/test/java/libcore/java/time/chrono/
DChronoZonedDateTimeTest.java17 package libcore.java.time.chrono;
32 import java.time.chrono.ChronoLocalDateTime;
33 import java.time.chrono.ChronoZonedDateTime;
34 import java.time.chrono.JapaneseChronology;
35 import java.time.chrono.JapaneseDate;
72 JapaneseChronology chrono = JapaneseChronology.INSTANCE; in testFormat() local
78 ChronoZonedDateTime<JapaneseDate> chronoZonedDateTime = chrono.zonedDateTime(epochTime); in testFormat()
81 ChronoLocalDateTime<JapaneseDate> chronoLocalDateTime = chrono.localDateTime(epochTime); in testFormat()
DChronologyTest.java16 package libcore.java.time.chrono;
19 import java.time.chrono.AbstractChronology;
20 import java.time.chrono.ChronoLocalDate;
21 import java.time.chrono.Chronology;
22 import java.time.chrono.Era;
23 import java.time.chrono.IsoChronology;

123456