月間グラフの表示範囲が月末になると1ヶ月ズレるバグの修正 (#73)

refs #72
This commit is contained in:
shibafu 2019-01-31 00:14:26 +09:00 committed by GitHub
parent 4ab82ff0e2
commit e320f85c73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,7 +102,7 @@ SQL
}
// 月間グラフ用の配列初期化
$month = Carbon::now()->subMonth(11)->firstOfMonth(); // 直近12ヶ月
$month = Carbon::now()->firstOfMonth()->subMonth(11); // 直近12ヶ月
for ($i = 0; $i < 12; $i++) {
$monthlySum[$month->format('Y/m')] = 0;
$month->addMonth();