mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-19 00:49:51 +08:00
Fix next sunday.
This commit is contained in:
committed by
Melledy
Unverified
parent
b535645fb2
commit
df85e0ac3c
@@ -352,7 +352,10 @@ public class BattlePassManager {
|
||||
|
||||
//
|
||||
public BattlePassSchedule getScheduleProto() {
|
||||
var nextSundayDate = LocalDate.now().with(TemporalAdjusters.next(DayOfWeek.SUNDAY));
|
||||
var currentDate = LocalDate.now();
|
||||
var nextSundayDate = (currentDate.getDayOfWeek() == DayOfWeek.SUNDAY)
|
||||
? currentDate
|
||||
: LocalDate.now().with(TemporalAdjusters.next(DayOfWeek.SUNDAY));
|
||||
var nextSundayTime = LocalDateTime.of(nextSundayDate.getYear(), nextSundayDate.getMonthValue(), nextSundayDate.getDayOfMonth(), 23, 59, 59);
|
||||
|
||||
BattlePassSchedule.Builder schedule = BattlePassSchedule.newBuilder()
|
||||
|
||||
Reference in New Issue
Block a user