mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-02-13 13:42:53 +08:00
Fix next sunday.
This commit is contained in:
parent
7cb4c9fee2
commit
54c4f60abb
@ -352,7 +352,10 @@ public class BattlePassManager {
|
|||||||
|
|
||||||
//
|
//
|
||||||
public BattlePassSchedule getScheduleProto() {
|
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);
|
var nextSundayTime = LocalDateTime.of(nextSundayDate.getYear(), nextSundayDate.getMonthValue(), nextSundayDate.getDayOfMonth(), 23, 59, 59);
|
||||||
|
|
||||||
BattlePassSchedule.Builder schedule = BattlePassSchedule.newBuilder()
|
BattlePassSchedule.Builder schedule = BattlePassSchedule.newBuilder()
|
||||||
|
Loading…
Reference in New Issue
Block a user