本文整理匯總了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;
}
示例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},
};
}
示例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;
}
示例4: isWeekend
public boolean isWeekend(LocalDate date) {
DayOfWeek day = date.getDayOfWeek();
return day == DayOfWeek.SATURDAY || day == DayOfWeek.SUNDAY;
}
示例5: isWeekend
public static boolean isWeekend(LocalDate date) {
return date.getDayOfWeek() == DayOfWeek.SATURDAY
|| date.getDayOfWeek() == DayOfWeek.SUNDAY;
}
示例6: isSlowTickDate
private static boolean isSlowTickDate() {
return LocalDate.now().getDayOfWeek() == DayOfWeek.SATURDAY
|| LocalDate.now().getDayOfWeek() == DayOfWeek.SUNDAY;
}
示例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);
}