mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-02-09 05:52:52 +08:00
Fix next sunday.
This commit is contained in:
parent
7cb4c9fee2
commit
54c4f60abb
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user