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