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


Java DayOfWeek.SATURDAY屬性代碼示例

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


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

示例1: renderDayItem

/**
 * Creates a node for a given day. Styling should be done via CSS, but
 * appropriate CSS classes are assigned to each node.
 * @param date A given date the node is associated with.
 * @return A node that displays the day of month.
 */
private Node renderDayItem(LocalDate date) {
    Label lblDate = new Label(""+date.getDayOfMonth());
    lblDate.getStyleClass().add("daychooser-day");
    if(date.getDayOfWeek() == DayOfWeek.SATURDAY
            || date.getDayOfWeek() == DayOfWeek.SUNDAY) {
        lblDate.getStyleClass().add("daychooser-weekend");
    } else {
        lblDate.getStyleClass().add("daychooser-weekday");
    }
    if(date.equals(selectedDateProperty.get())) {
        lblDate.getStyleClass().add("daychooser-selected-day");
    }
    if(date.equals(LocalDate.now())) {
        lblDate.getStyleClass().add("daychooser-current-day");
    }

    return lblDate;
}
 
開發者ID:Jibbow,項目名稱:FastisFX,代碼行數:24,代碼來源:DayChooser.java

示例2: data_week

@DataProvider(name="IsoWeekData")
Object[][] data_week() {
    return new Object[][] {
            {LocalDate.of(1969, 12, 29), DayOfWeek.MONDAY, 1, 1970},
            {LocalDate.of(2012, 12, 23), DayOfWeek.SUNDAY, 51, 2012},
            {LocalDate.of(2012, 12, 24), DayOfWeek.MONDAY, 52, 2012},
            {LocalDate.of(2012, 12, 27), DayOfWeek.THURSDAY, 52, 2012},
            {LocalDate.of(2012, 12, 28), DayOfWeek.FRIDAY, 52, 2012},
            {LocalDate.of(2012, 12, 29), DayOfWeek.SATURDAY, 52, 2012},
            {LocalDate.of(2012, 12, 30), DayOfWeek.SUNDAY, 52, 2012},
            {LocalDate.of(2012, 12, 31), DayOfWeek.MONDAY, 1, 2013},
            {LocalDate.of(2013, 1, 1), DayOfWeek.TUESDAY, 1, 2013},
            {LocalDate.of(2013, 1, 2), DayOfWeek.WEDNESDAY, 1, 2013},
            {LocalDate.of(2013, 1, 6), DayOfWeek.SUNDAY, 1, 2013},
            {LocalDate.of(2013, 1, 7), DayOfWeek.MONDAY, 2, 2013},
    };
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:17,代碼來源:TCKWeekFields.java

示例3: isWeekday

public DayAssert isWeekday() {
    DayOfWeek day = actual.getDayOfWeek();

    if (day == DayOfWeek.SATURDAY || day == DayOfWeek.SUNDAY) {
        failWithMessage("Expected weekday but was <%s>", actual.getDayOfWeek());
    }

    return this;
}
 
開發者ID:hmcts,項目名稱:cmc-claim-store,代碼行數:9,代碼來源:DayAssert.java

示例4: isWeekend

public boolean isWeekend(LocalDate date) {
    DayOfWeek day = date.getDayOfWeek();
    return day == DayOfWeek.SATURDAY || day == DayOfWeek.SUNDAY;
}
 
開發者ID:hmcts,項目名稱:cmc-claim-store,代碼行數:4,代碼來源:WorkingDayIndicator.java

示例5: isWeekend

public static boolean isWeekend(LocalDate date) {
	return date.getDayOfWeek() == DayOfWeek.SATURDAY 
			|| date.getDayOfWeek() == DayOfWeek.SUNDAY;
}
 
開發者ID:vibridi,項目名稱:qgu,代碼行數:4,代碼來源:DateUtils.java

示例6: isSlowTickDate

private static boolean isSlowTickDate() {
    return LocalDate.now().getDayOfWeek() == DayOfWeek.SATURDAY
            || LocalDate.now().getDayOfWeek() == DayOfWeek.SUNDAY;
}
 
開發者ID:OlegDokuka,項目名稱:reactive-playing,代碼行數:4,代碼來源:TickTack.java

示例7: isOpeningDay

/**
 * Check if date is opening day for a specific mensa
 * @param date
 * @param mensa
 * @return true if is opening day, false otherwise
 */
public boolean isOpeningDay(LocalDate date, Mensa mensa) {
    DayOfWeek firstDayClosed = config.isMensaOpenOnSaturday(mensa) ? DayOfWeek.SUNDAY : DayOfWeek.SATURDAY;
    return date.getDayOfWeek().compareTo(firstDayClosed) < 0 && !HOLIDAY_MANAGER.isHoliday(date);
}
 
開發者ID:xabgesagtx,項目名稱:mensa-api,代碼行數:10,代碼來源:TimeUtils.java


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