From 95af63e89a0b9be3c6dee2e5413a54dd7210572e Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Sat, 30 Apr 2022 16:03:07 +0800 Subject: [PATCH] fix attendance calendar do not show last day of monty --- app/Console/Commands/ExamUpdateProgress.php | 2 +- app/Console/Commands/Test.php | 3 ++- include/constants.php | 4 ++-- public/attendance.php | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/Console/Commands/ExamUpdateProgress.php b/app/Console/Commands/ExamUpdateProgress.php index 7ce9b05f..46961286 100644 --- a/app/Console/Commands/ExamUpdateProgress.php +++ b/app/Console/Commands/ExamUpdateProgress.php @@ -13,7 +13,7 @@ class ExamUpdateProgress extends Command * * @var string */ - protected $signature = 'exam:update_progress {--uid} {--bulk}'; + protected $signature = 'exam:update_progress {--uid=} {--bulk=}'; /** * The console command description. diff --git a/app/Console/Commands/Test.php b/app/Console/Commands/Test.php index bc857834..bdec053e 100644 --- a/app/Console/Commands/Test.php +++ b/app/Console/Commands/Test.php @@ -126,7 +126,8 @@ class Test extends Command // $r = $rep->getContinuousDays($attendance); // $r = $rep->getContinuousPoints(11); - $r = NexusDB::getAll('users', 'id = 1'); + $today = Carbon::today(); + $r = $today->endOfMonth(); dd($r); } diff --git a/include/constants.php b/include/constants.php index 1e62e0db..3cea0e48 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,6 +1,6 @@ $start->format('Y-m-d'), 'end' => $end->format('Y-m-d')]); +$validRangeStr = json_encode(['start' => $start->format('Y-m-d'), 'end' => $end->clone()->addDays(1)->format('Y-m-d')]); $js = <<