当前位置: 首页>>代码示例>>Java>>正文


Java DayOfWeek.SUNDAY属性代码示例

本文整理汇总了Java中java.time.DayOfWeek.SUNDAY属性的典型用法代码示例。如果您正苦于以下问题:Java DayOfWeek.SUNDAY属性的具体用法?Java DayOfWeek.SUNDAY怎么用?Java DayOfWeek.SUNDAY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在java.time.DayOfWeek的用法示例。


在下文中一共展示了DayOfWeek.SUNDAY属性的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: of

/**
 * Obtains an instance of {@code WeekDefinition} appropriate for a locale.
 * <p>
 * This will look up appropriate values from the provider of localization data.
 * 
 * @param locale the locale to use, not null
 * @return the week-definition, not null
 */
public static WeekDefinition of(Locale locale) {

  Jdk7Methods.Objects_requireNonNull(locale, "locale");
  DayOfWeek dow = DayOfWeek.MONDAY;
  if ("US".equals(locale.getCountry())) {
    dow = DayOfWeek.SUNDAY;
  }
  int minDays = 4; // ISO-08601 // gcal.getMinimalDaysInFirstWeek();
  return WeekDefinition.of(dow, minDays);
}
 
开发者ID:kiegroup,项目名称:optashift-employee-rostering,代码行数:18,代码来源:WeekDefinition.java

示例5: providerDayOfWeekData

@DataProvider(name="parseDayOfWeekText")
Object[][] providerDayOfWeekData() {
    return new Object[][] {
        // Locale, pattern, input text, expected DayOfWeek
        {Locale.US, "e",  "1",  DayOfWeek.SUNDAY},
        {Locale.US, "ee", "01", DayOfWeek.SUNDAY},
        {Locale.US, "c",  "1",  DayOfWeek.SUNDAY},

        {Locale.UK, "e",  "1",  DayOfWeek.MONDAY},
        {Locale.UK, "ee", "01", DayOfWeek.MONDAY},
        {Locale.UK, "c",  "1",  DayOfWeek.MONDAY},
    };
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:13,代码来源:TestTextParser.java

示例6: providerDayOfWeekData

@DataProvider(name="print_DayOfWeekData")
Object[][] providerDayOfWeekData() {
    return new Object[][] {
        // Locale, pattern, expected text, input DayOfWeek
        {Locale.US, "e",  "1",  DayOfWeek.SUNDAY},
        {Locale.US, "ee", "01", DayOfWeek.SUNDAY},
        {Locale.US, "c",  "1",  DayOfWeek.SUNDAY},

        {Locale.UK, "e",  "1",  DayOfWeek.MONDAY},
        {Locale.UK, "ee", "01", DayOfWeek.MONDAY},
        {Locale.UK, "c",  "1",  DayOfWeek.MONDAY},
    };
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:13,代码来源:TestTextPrinter.java

示例7: providerDayOfWeekData

@DataProvider(name="parseDayOfWeekText")
Object[][] providerDayOfWeekData() {
    return new Object[][] {
        // Locale, pattern, input text, expected DayOfWeek
        {Locale.US, "e",  "1",  DayOfWeek.SUNDAY},
        {Locale.US, "ee", "01", DayOfWeek.SUNDAY},
        {Locale.US, "c",  "1",  DayOfWeek.SUNDAY},
    };
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:TestTextParser.java

示例8: providerDayOfWeekData

@DataProvider(name="print_DayOfWeekData")
Object[][] providerDayOfWeekData() {
    return new Object[][] {
        // Locale, pattern, expected text, input DayOfWeek
        {Locale.US, "e",  "1",  DayOfWeek.SUNDAY},
        {Locale.US, "ee", "01", DayOfWeek.SUNDAY},
        {Locale.US, "c",  "1",  DayOfWeek.SUNDAY},
    };
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:TestTextPrinter.java

示例9: 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

示例10: isWeekend

public static boolean isWeekend(LocalDate date) {
	return date.getDayOfWeek() == DayOfWeek.SATURDAY 
			|| date.getDayOfWeek() == DayOfWeek.SUNDAY;
}
 
开发者ID:vibridi,项目名称:qgu,代码行数:4,代码来源:DateUtils.java

示例11: isSlowTickDate

private static boolean isSlowTickDate() {
    return LocalDate.now().getDayOfWeek() == DayOfWeek.SATURDAY
            || LocalDate.now().getDayOfWeek() == DayOfWeek.SUNDAY;
}
 
开发者ID:OlegDokuka,项目名称:reactive-playing,代码行数:4,代码来源:TickTack.java

示例12: 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.SUNDAY属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。