Compare commits
2 Commits
c8aa18338a
...
130f93a9f3
Author | SHA1 | Date | |
---|---|---|---|
130f93a9f3 | |||
67a2eff6a2 |
@ -208,7 +208,7 @@ public class StationSettings {
|
|||||||
int weekdayDifference = scheduleStartDate.getDayOfWeek().getValue() - LocalDate.now().getDayOfWeek().getValue();
|
int weekdayDifference = scheduleStartDate.getDayOfWeek().getValue() - LocalDate.now().getDayOfWeek().getValue();
|
||||||
System.out.println("weekdayDifference: " + weekdayDifference);
|
System.out.println("weekdayDifference: " + weekdayDifference);
|
||||||
if (weekdayDifference > 0) {
|
if (weekdayDifference > 0) {
|
||||||
return LocalDate.now().plusDays(weekdayDifference).atTime(scheduleStartTime);
|
LocalDate.now().plusDays(weekdayDifference).atTime(scheduleStartTime);
|
||||||
} else if (weekdayDifference == 0){
|
} else if (weekdayDifference == 0){
|
||||||
if (LocalTime.now().isBefore(scheduleStartTime)) {
|
if (LocalTime.now().isBefore(scheduleStartTime)) {
|
||||||
return LocalDate.now().atTime(scheduleStartTime);
|
return LocalDate.now().atTime(scheduleStartTime);
|
||||||
@ -221,7 +221,7 @@ public class StationSettings {
|
|||||||
case MONTHLY:
|
case MONTHLY:
|
||||||
int monthdayDifference = scheduleStartDate.getDayOfMonth() - LocalDate.now().getDayOfMonth();
|
int monthdayDifference = scheduleStartDate.getDayOfMonth() - LocalDate.now().getDayOfMonth();
|
||||||
if (monthdayDifference > 0) {
|
if (monthdayDifference > 0) {
|
||||||
return LocalDate.now().plusDays(monthdayDifference).atTime(scheduleStartTime);
|
LocalDate.now().plusDays(monthdayDifference).atTime(scheduleStartTime);
|
||||||
} else if (monthdayDifference == 0) {
|
} else if (monthdayDifference == 0) {
|
||||||
if (LocalTime.now().isBefore(scheduleStartTime)) {
|
if (LocalTime.now().isBefore(scheduleStartTime)) {
|
||||||
return LocalDate.now().atTime(scheduleStartTime);
|
return LocalDate.now().atTime(scheduleStartTime);
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 102 KiB |
Loading…
x
Reference in New Issue
Block a user