當前位置: 首頁>>代碼示例>>Java>>正文


Java LocalTime.NOON屬性代碼示例

本文整理匯總了Java中java.time.LocalTime.NOON屬性的典型用法代碼示例。如果您正苦於以下問題:Java LocalTime.NOON屬性的具體用法?Java LocalTime.NOON怎麽用?Java LocalTime.NOON使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在java.time.LocalTime的用法示例。


在下文中一共展示了LocalTime.NOON屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getZonedDateTimeAt

@Override
public final ZonedDateTime getZonedDateTimeAt(double x, double y) {
    int day = (int) (x / (getWidth() / getNumberOfDays()));

    LocalDate date = getDate();

    if (isAdjustToFirstDayOfWeek()) {
        date = Util.adjustToFirstDayOfWeek(date, getFirstDayOfWeek());
    }

    date = date.plusDays(day);

    LocalTime time = LocalTime.NOON;
    ZoneId zoneId = getZoneId();
    return ZonedDateTime.of(date, time, zoneId);
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:16,代碼來源:AllDayView.java

示例2: data_adjustInto

@DataProvider(name="adjustInto")
Object[][] data_adjustInto() {
    return new Object[][]{
            {LocalTime.of(23, 5), LocalTime.of(4, 1, 1, 100), LocalTime.of(23, 5, 0, 0), null},
            {LocalTime.of(23, 5, 20), LocalTime.of(4, 1, 1, 100), LocalTime.of(23, 5, 20, 0), null},
            {LocalTime.of(23, 5, 20, 1000), LocalTime.of(4, 1, 1, 100), LocalTime.of(23, 5, 20, 1000), null},
            {LocalTime.of(23, 5, 20, 1000), LocalTime.MAX, LocalTime.of(23, 5, 20, 1000), null},
            {LocalTime.of(23, 5, 20, 1000), LocalTime.MIN, LocalTime.of(23, 5, 20, 1000), null},
            {LocalTime.of(23, 5, 20, 1000), LocalTime.NOON, LocalTime.of(23, 5, 20, 1000), null},
            {LocalTime.of(23, 5, 20, 1000), LocalTime.MIDNIGHT, LocalTime.of(23, 5, 20, 1000), null},
            {LocalTime.MAX, LocalTime.of(23, 5, 20, 1000), LocalTime.of(23, 59, 59, 999999999), null},
            {LocalTime.MIN, LocalTime.of(23, 5, 20, 1000), LocalTime.of(0, 0, 0), null},
            {LocalTime.NOON, LocalTime.of(23, 5, 20, 1000), LocalTime.of(12, 0, 0), null},
            {LocalTime.MIDNIGHT, LocalTime.of(23, 5, 20, 1000), LocalTime.of(0, 0, 0), null},

            {LocalTime.of(23, 5), LocalDateTime.of(2210, 2, 2, 1, 1), LocalDateTime.of(2210, 2, 2, 23, 5), null},
            {LocalTime.of(23, 5), OffsetTime.of(1, 1, 0, 0, OFFSET_PTWO), OffsetTime.of(23, 5, 0, 0, OFFSET_PTWO), null},
            {LocalTime.of(23, 5), OffsetDateTime.of(2210, 2, 2, 1, 1, 0, 0, OFFSET_PTWO), OffsetDateTime.of(2210, 2, 2, 23, 5, 0, 0, OFFSET_PTWO), null},
            {LocalTime.of(23, 5), ZonedDateTime.of(2210, 2, 2, 1, 1, 0, 0, ZONE_PARIS), ZonedDateTime.of(2210, 2, 2, 23, 5, 0, 0, ZONE_PARIS), null},

            {LocalTime.of(23, 5), LocalDate.of(2210, 2, 2), null, DateTimeException.class},
            {LocalTime.of(23, 5), null, null, NullPointerException.class},

    };
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:25,代碼來源:TCKLocalTime.java

示例3: samples

@Override
protected List<TemporalAccessor> samples() {
    TemporalAccessor[] array = {TEST_12_30_40_987654321, LocalTime.MIN, LocalTime.MAX, LocalTime.MIDNIGHT, LocalTime.NOON};
    return Arrays.asList(array);
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:5,代碼來源:TCKLocalTime.java

示例4: getNoonTime

public LocalTime getNoonTime() {
    return LocalTime.NOON;
}
 
開發者ID:donbeave,項目名稱:graphql-java-datetime,代碼行數:3,代碼來源:Query.java


注:本文中的java.time.LocalTime.NOON屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。