本文整理汇总了Java中java.time.chrono.MinguoDate.atTime方法的典型用法代码示例。如果您正苦于以下问题:Java MinguoDate.atTime方法的具体用法?Java MinguoDate.atTime怎么用?Java MinguoDate.atTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.time.chrono.MinguoDate
的用法示例。
在下文中一共展示了MinguoDate.atTime方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test_MinguoDate
import java.time.chrono.MinguoDate; //导入方法依赖的package包/类
@SuppressWarnings("unused")
@Test(dataProvider="samples")
public void test_MinguoDate(MinguoDate minguoDate, LocalDate iso) {
MinguoDate hd = minguoDate;
ChronoLocalDateTime<MinguoDate> hdt = hd.atTime(LocalTime.NOON);
ZoneOffset zo = ZoneOffset.ofHours(1);
ChronoZonedDateTime<MinguoDate> hzdt = hdt.atZone(zo);
hdt = hdt.plus(1, ChronoUnit.YEARS);
hdt = hdt.plus(1, ChronoUnit.MONTHS);
hdt = hdt.plus(1, ChronoUnit.DAYS);
hdt = hdt.plus(1, ChronoUnit.HOURS);
hdt = hdt.plus(1, ChronoUnit.MINUTES);
hdt = hdt.plus(1, ChronoUnit.SECONDS);
hdt = hdt.plus(1, ChronoUnit.NANOS);
ChronoLocalDateTime<MinguoDate> a2 = hzdt.toLocalDateTime();
MinguoDate a3 = a2.toLocalDate();
MinguoDate a5 = hzdt.toLocalDate();
//System.out.printf(" d: %s, dt: %s; odt: %s; zodt: %s; a4: %s%n", date, hdt, hodt, hzdt, a5);
}
示例2: test_MinguoChrono
import java.time.chrono.MinguoDate; //导入方法依赖的package包/类
@Test()
public void test_MinguoChrono() {
MinguoDate h1 = MinguoChronology.INSTANCE.date(MinguoEra.ROC, 1, 2, 3);
MinguoDate h2 = h1;
ChronoLocalDateTime<MinguoDate> h3 = h2.atTime(LocalTime.NOON);
@SuppressWarnings("unused")
ChronoZonedDateTime<MinguoDate> h4 = h3.atZone(ZoneOffset.UTC);
}