Java Code Examples for java.time.DayOfWeek#WEDNESDAY

The following examples show how to use java.time.DayOfWeek#WEDNESDAY . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TCKWeekFields.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
@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},
    };
}
 
Example 2
Source File: TCKWeekFields.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
@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},
    };
}
 
Example 3
Source File: TCKWeekFields.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@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},
    };
}
 
Example 4
Source File: TCKWeekFields.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
@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},
    };
}
 
Example 5
Source File: TCKWeekFields.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@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},
    };
}
 
Example 6
Source File: TCKWeekFields.java    From j2objc with Apache License 2.0 6 votes vote down vote up
@DataProvider
public static 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},
    };
}
 
Example 7
Source File: TCKWeekFields.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@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},
    };
}
 
Example 8
Source File: WeeklyPlanningServiceImp.java    From axelor-open-suite with GNU Affero General Public License v3.0 6 votes vote down vote up
private DayOfWeek getDayOfWeek(DayPlanning day) {
  switch (day.getName()) {
    case "monday":
      return DayOfWeek.MONDAY;
    case "tuesday":
      return DayOfWeek.TUESDAY;
    case "wednesday":
      return DayOfWeek.WEDNESDAY;
    case "thursday":
      return DayOfWeek.THURSDAY;
    case "friday":
      return DayOfWeek.FRIDAY;
    case "saturday":
      return DayOfWeek.SATURDAY;
    case "sunday":
      return DayOfWeek.SUNDAY;
    default:
      return DayOfWeek.SUNDAY;
  }
}
 
Example 9
Source File: TCKWeekFields.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@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},
    };
}
 
Example 10
Source File: FlipController.java    From tutorials with MIT License 5 votes vote down vote up
@RequestMapping(value = "/foo/{id}", method = RequestMethod.GET)
@FlipOnDaysOfWeek(daysOfWeek = {
    DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY,
    DayOfWeek.FRIDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY
})
public Foo getFooByNewId(@PathVariable int id) {
    return flipService.getFooById(id).orElse(new Foo("Not Found", -1));
}
 
Example 11
Source File: StringColumnDayOfWeekMapper.java    From jadira with Apache License 2.0 5 votes vote down vote up
@Override
public DayOfWeek fromNonNullValue(String s) {
	
	switch(s) {
		case "SATURDAY" : return DayOfWeek.SATURDAY;
		case "SUNDAY" : return DayOfWeek.SUNDAY;
		case "MONDAY" : return DayOfWeek.MONDAY;
		case "TUESDAY" : return DayOfWeek.TUESDAY;
		case "WEDNESDAY" : return DayOfWeek.WEDNESDAY;
		case "THURSDAY" : return DayOfWeek.THURSDAY;
		case "FRIDAY" : return DayOfWeek.FRIDAY;
		default: throw new IllegalArgumentException("Seen unexpected DayOfWeek: " + s);
	}
}
 
Example 12
Source File: TimeSection.java    From tilesfx with Apache License 2.0 4 votes vote down vote up
public TimeSection(final LocalTime START, final LocalTime STOP, final String TEXT, final Color COLOR, final Color TEXT_COLOR) {
    this(START, STOP, TEXT, null, COLOR, COLOR, TEXT_COLOR, false, DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY);
}
 
Example 13
Source File: TimeSection.java    From tilesfx with Apache License 2.0 4 votes vote down vote up
public TimeSection(final LocalTime START, final LocalTime STOP, final Image ICON, final Color COLOR) {
    this(START, STOP, "", ICON, COLOR, COLOR, Color.WHITE, false, DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY);
}
 
Example 14
Source File: PackedLocalDateTime.java    From tablesaw with Apache License 2.0 4 votes vote down vote up
public static boolean isWednesday(long packedDateTime) {
  if (packedDateTime == missingValueIndicator()) return false;
  DayOfWeek dayOfWeek = getDayOfWeek(packedDateTime);
  return dayOfWeek == DayOfWeek.WEDNESDAY;
}
 
Example 15
Source File: TimeSection.java    From OEE-Designer with MIT License 4 votes vote down vote up
public TimeSection(final LocalTime START, final LocalTime STOP, final Color COLOR) {
    this(START, STOP, "", null, COLOR, COLOR, Color.TRANSPARENT, false, DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY);
}
 
Example 16
Source File: TimeSection.java    From OEE-Designer with MIT License 4 votes vote down vote up
public TimeSection(final LocalTime START, final LocalTime STOP) {
    this(START, STOP, "", null, Color.TRANSPARENT, Color.TRANSPARENT, Color.TRANSPARENT, false, DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY);
}
 
Example 17
Source File: PackedLocalDateTime.java    From tablesaw with Apache License 2.0 4 votes vote down vote up
public static boolean isWednesday(long packedDateTime) {
  if (packedDateTime == missingValueIndicator()) return false;
  DayOfWeek dayOfWeek = getDayOfWeek(packedDateTime);
  return dayOfWeek == DayOfWeek.WEDNESDAY;
}
 
Example 18
Source File: DateMatchers.java    From elexis-3-core with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Creates a matcher that matches when the examined date is on a wednesday
 * <p/>
 * For example:
 *
 * <pre>
 * assertThat(myDate, isWednesday());
 * </pre>
 */
public static Matcher<Date> isWednesday() {
    return new IsDayOfWeek<Date>(DayOfWeek.WEDNESDAY, DateMatchers::dateToZoneDateTime);
}
 
Example 19
Source File: TimeSection.java    From OEE-Designer with MIT License 2 votes vote down vote up
/**
 * Represents an area of a given range, defined by a start and stop time.
 * This class is used for regions and areas in many clocks. It is possible
 * to check a time against the defined range and fire events in case the
 * value enters or leaves the defined region.
 */
public TimeSection() {
    this(LocalTime.now(), LocalTime.now(), "", null, Color.TRANSPARENT, Color.TRANSPARENT, Color.TRANSPARENT, false, DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY);
}
 
Example 20
Source File: TimeSection.java    From tilesfx with Apache License 2.0 2 votes vote down vote up
/**
 * Represents an area of a given range, defined by a start and stop time.
 * This class is used for regions and areas in many clocks. It is possible
 * to check a time against the defined range and fire events in case the
 * value enters or leaves the defined region.
 */
public TimeSection() {
    this(LocalTime.now(), LocalTime.now(), "", null, Color.TRANSPARENT, Color.TRANSPARENT, Color.TRANSPARENT, false, DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY);
}