mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 00:04:24 +00:00
Restore old behavior
This commit is contained in:
@@ -110,7 +110,7 @@ class AppendBudgetLimitPeriods extends Command
|
||||
return 'daily';
|
||||
}
|
||||
// is weekly
|
||||
if ('1' === $limit->start_date->format('N') && '7' === $limit->end_date->format('N') && 6 === $limit->end_date->diffInDays($limit->start_date)) {
|
||||
if ('1' === $limit->start_date->format('N') && '7' === $limit->end_date->format('N') && 6 === (int)$limit->end_date->diffInDays($limit->start_date, true)) {
|
||||
return 'weekly';
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ class AppendBudgetLimitPeriods extends Command
|
||||
if (
|
||||
in_array($limit->start_date->format('j-n'), $start, true) // start of quarter
|
||||
&& in_array($limit->end_date->format('j-n'), $end, true) // end of quarter
|
||||
&& 2 === $limit->start_date->diffInMonths($limit->end_date)
|
||||
&& 2 === (int)$limit->start_date->diffInMonths($limit->end_date, true)
|
||||
) {
|
||||
return 'quarterly';
|
||||
}
|
||||
@@ -139,7 +139,7 @@ class AppendBudgetLimitPeriods extends Command
|
||||
if (
|
||||
in_array($limit->start_date->format('j-n'), $start, true) // start of quarter
|
||||
&& in_array($limit->end_date->format('j-n'), $end, true) // end of quarter
|
||||
&& 5 === $limit->start_date->diffInMonths($limit->end_date)
|
||||
&& 5 === (int)$limit->start_date->diffInMonths($limit->end_date, true)
|
||||
) {
|
||||
return 'half_year';
|
||||
}
|
||||
|
Reference in New Issue
Block a user