Replace deprecated method.

This commit is contained in:
James Cole
2022-03-27 20:24:13 +02:00
parent 8ee4c2ea11
commit cbf14f541c
39 changed files with 140 additions and 123 deletions

View File

@@ -237,7 +237,8 @@ class ReconcileController extends Controller
// title:
$description = trans(
'firefly.reconciliation_transaction_title',
['from' => $start->formatLocalized($this->monthAndDayFormat), 'to' => $end->formatLocalized($this->monthAndDayFormat)]
['from' => $start->isoFormat($this->monthAndDayFormat),
'to' => $end->isoFormat($this->monthAndDayFormat)]
);
$submission = [
'user' => auth()->user()->id,

View File

@@ -109,8 +109,8 @@ class ShowController extends Controller
$page = (int)$request->get('page');
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
$currency = $this->repository->getAccountCurrency($account) ?? app('amount')->getDefaultCurrency();
$fStart = $start->formatLocalized($this->monthAndDayFormat);
$fEnd = $end->formatLocalized($this->monthAndDayFormat);
$fStart = $start->isoFormat($this->monthAndDayFormat);
$fEnd = $end->isoFormat($this->monthAndDayFormat);
$subTitle = (string)trans('firefly.journals_in_period_for_account', ['name' => $account->name, 'start' => $fStart, 'end' => $fEnd]);
$chartUri = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
$firstTransaction = $this->repository->oldestJournalDate($account) ?? $start;

View File

@@ -208,8 +208,8 @@ class IndexController extends Controller
$array['budgeted'][] = [
'id' => $limit->id,
'amount' => number_format((float)$limit->amount, $currency->decimal_places, '.', ''),
'start_date' => $limit->start_date->formatLocalized($this->monthAndDayFormat),
'end_date' => $limit->end_date->formatLocalized($this->monthAndDayFormat),
'start_date' => $limit->start_date->isoFormat($this->monthAndDayFormat),
'end_date' => $limit->end_date->isoFormat($this->monthAndDayFormat),
'in_range' => $limit->start_date->isSameDay($start) && $limit->end_date->isSameDay($end),
'currency_id' => $currency->id,
'currency_symbol' => $currency->symbol,

View File

@@ -88,7 +88,7 @@ class ShowController extends Controller
$end = $end ?? session('end');
$subTitle = trans(
'firefly.without_budget_between',
['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)]
['start' => $start->isoFormat($this->monthAndDayFormat), 'end' => $end->isoFormat($this->monthAndDayFormat)]
);
// get first journal ever to set off the budget period overview.
@@ -192,8 +192,8 @@ class ShowController extends Controller
'firefly.budget_in_period',
[
'name' => $budget->name,
'start' => $budgetLimit->start_date->formatLocalized($this->monthAndDayFormat),
'end' => $budgetLimit->end_date->formatLocalized($this->monthAndDayFormat),
'start' => $budgetLimit->start_date->isoFormat($this->monthAndDayFormat),
'end' => $budgetLimit->end_date->isoFormat($this->monthAndDayFormat),
'currency' => $budgetLimit->transactionCurrency->name,
]
);

View File

@@ -88,7 +88,7 @@ class NoCategoryController extends Controller
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
$subTitle = trans(
'firefly.without_category_between',
['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)]
['start' => $start->isoFormat($this->monthAndDayFormat), 'end' => $end->isoFormat($this->monthAndDayFormat)]
);
$periods = $this->getNoCategoryPeriodOverview($start);

View File

@@ -94,8 +94,8 @@ class ShowController extends Controller
$path = route('categories.show', [$category->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
$subTitle = trans(
'firefly.journals_in_period_for_category',
['name' => $category->name, 'start' => $start->formatLocalized($this->monthAndDayFormat),
'end' => $end->formatLocalized($this->monthAndDayFormat),]
['name' => $category->name, 'start' => $start->isoFormat($this->monthAndDayFormat),
'end' => $end->isoFormat($this->monthAndDayFormat),]
);
/** @var GroupCollectorInterface $collector */

View File

@@ -493,7 +493,7 @@ class AccountController extends Controller
while ($end >= $current) {
$theDate = $current->format('Y-m-d');
$balance = $range[$theDate] ?? $previous;
$label = $current->formatLocalized($format);
$label = $current->isoFormat($format);
$entries[$label] = (float)$balance;
$previous = $balance;
$current->addDay();

View File

@@ -145,7 +145,7 @@ class BillController extends Controller
];
foreach ($journals as $journal) {
$date = $journal['date']->formatLocalized((string)trans('config.month_and_day', [], $locale));
$date = $journal['date']->isoFormat((string)trans('config.month_and_day_js', [], $locale));
$chartData[0]['entries'][$date] = $bill->amount_min; // minimum amount of bill
$chartData[1]['entries'][$date] = $bill->amount_max; // maximum amount of bill

View File

@@ -184,7 +184,7 @@ class BudgetController extends Controller
$expenses = $this->opsRepository->sumExpenses($current, $current, null, $budgetCollection, $currency);
$spent = $expenses[(int)$currency->id]['sum'] ?? '0';
$amount = bcadd($amount, $spent);
$format = $start->formatLocalized((string)trans('config.month_and_day', [], $locale));
$format = $start->isoFormat((string)trans('config.month_and_day_js', [], $locale));
$entries[$format] = $amount;
$start->addDay();
@@ -478,7 +478,7 @@ class BudgetController extends Controller
$currentStart = clone $start;
while ($currentStart <= $end) {
$currentStart = app('navigation')->startOfPeriod($currentStart, $preferredRange);
$title = $currentStart->formatLocalized($titleFormat);
$title = $currentStart->isoFormat($titleFormat);
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
// default limit is no limit:
@@ -539,7 +539,7 @@ class BudgetController extends Controller
$preferredRange = app('navigation')->preferredRangeFormat($start, $end);
while ($currentStart <= $end) {
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
$title = $currentStart->formatLocalized($titleFormat);
$title = $currentStart->isoFormat($titleFormat);
$sum = $this->nbRepository->sumExpenses($currentStart, $currentEnd, $accounts, $currency);
$amount = app('steam')->positive($sum[$currency->id]['sum'] ?? '0');
$chartData[$title] = round((float)$amount, $currency->decimal_places);

View File

@@ -212,7 +212,7 @@ class BudgetReportController extends Controller
foreach ($currency['budgets'] as $currentBudget) {
foreach ($currentBudget['transaction_journals'] as $journal) {
$key = $journal['date']->formatLocalized($format);
$key = $journal['date']->isoFormat($format);
$amount = app('steam')->positive($journal['amount']);
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
@@ -239,7 +239,7 @@ class BudgetReportController extends Controller
$currentStart = clone $start;
while ($currentStart <= $end) {
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
$key = $currentStart->formatLocalized($format);
$key = $currentStart->isoFormat($format);
$return[$key] = '0';
$currentStart = clone $currentEnd;
$currentStart->addDay()->startOfDay();

View File

@@ -240,7 +240,7 @@ class CategoryController extends Controller
$outSet = $expenses[$currencyId]['categories'][$categoryId] ?? ['transaction_journals' => []];
foreach ($outSet['transaction_journals'] as $journal) {
$amount = app('steam')->positive($journal['amount']);
$date = $journal['date']->formatLocalized($format);
$date = $journal['date']->isoFormat($format);
$chartData[$outKey]['entries'][$date] = $chartData[$outKey]['entries'][$date] ?? '0';
$chartData[$outKey]['entries'][$date] = bcadd($amount, $chartData[$outKey]['entries'][$date]);
@@ -249,7 +249,7 @@ class CategoryController extends Controller
$inSet = $income[$currencyId]['categories'][$categoryId] ?? ['transaction_journals' => []];
foreach ($inSet['transaction_journals'] as $journal) {
$amount = app('steam')->positive($journal['amount']);
$date = $journal['date']->formatLocalized($format);
$date = $journal['date']->isoFormat($format);
$chartData[$inKey]['entries'][$date] = $chartData[$inKey]['entries'][$date] ?? '0';
$chartData[$inKey]['entries'][$date] = bcadd($amount, $chartData[$inKey]['entries'][$date]);
}

View File

@@ -277,7 +277,7 @@ class CategoryReportController extends Controller
foreach ($currency['categories'] as $currentCategory) {
foreach ($currentCategory['transaction_journals'] as $journal) {
$key = $journal['date']->formatLocalized($format);
$key = $journal['date']->isoFormat($format);
$amount = app('steam')->positive($journal['amount']);
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
@@ -304,7 +304,7 @@ class CategoryReportController extends Controller
foreach ($currency['categories'] as $currentCategory) {
foreach ($currentCategory['transaction_journals'] as $journal) {
$key = $journal['date']->formatLocalized($format);
$key = $journal['date']->isoFormat($format);
$amount = app('steam')->positive($journal['amount']);
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
@@ -333,7 +333,7 @@ class CategoryReportController extends Controller
$currentStart = clone $start;
while ($currentStart <= $end) {
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
$key = $currentStart->formatLocalized($format);
$key = $currentStart->isoFormat($format);
$return[$key] = '0';
$currentStart = clone $currentEnd;
$currentStart->addDay()->startOfDay();

View File

@@ -210,7 +210,7 @@ class DoubleReportController extends Controller
];
foreach ($currency['transaction_journals'] as $journal) {
$key = $journal['date']->formatLocalized($format);
$key = $journal['date']->isoFormat($format);
$amount = app('steam')->positive($journal['amount']);
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
@@ -236,7 +236,7 @@ class DoubleReportController extends Controller
];
foreach ($currency['transaction_journals'] as $journal) {
$key = $journal['date']->formatLocalized($format);
$key = $journal['date']->isoFormat($format);
$amount = app('steam')->positive($journal['amount']);
$chartData[$earnedKey]['entries'][$key] = $chartData[$earnedKey]['entries'][$key] ?? '0';
$chartData[$earnedKey]['entries'][$key] = bcadd($chartData[$earnedKey]['entries'][$key], $amount);
@@ -289,7 +289,7 @@ class DoubleReportController extends Controller
$currentStart = clone $start;
while ($currentStart <= $end) {
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
$key = $currentStart->formatLocalized($format);
$key = $currentStart->isoFormat($format);
$return[$key] = '0';
$currentStart = clone $currentEnd;
$currentStart->addDay()->startOfDay();

View File

@@ -151,7 +151,7 @@ class ExpenseReportController extends Controller
// get expenses grouped by opposing name:
$expenses = $this->groupByName($this->getExpensesForOpposing($accounts, $all, $currentStart, $currentEnd));
$income = $this->groupByName($this->getIncomeForOpposing($accounts, $all, $currentStart, $currentEnd));
$label = $currentStart->formatLocalized($format);
$label = $currentStart->isoFormat($format);
foreach ($combined as $name => $combination) {
// first is always expense account:

View File

@@ -100,7 +100,7 @@ class PiggyBankController extends Controller
}
);
$currentSum = $filtered->sum('amount');
$label = $oldest->formatLocalized((string)trans('config.month_and_day', [], $locale));
$label = $oldest->isoFormat((string)trans('config.month_and_day_js', [], $locale));
$chartData[$label] = $currentSum;
$oldest = app('navigation')->addPeriod($oldest, $step, 0);
}
@@ -110,7 +110,7 @@ class PiggyBankController extends Controller
}
);
$finalSum = $finalFiltered->sum('amount');
$finalLabel = $today->formatLocalized((string)trans('config.month_and_day', [], $locale));
$finalLabel = $today->isoFormat((string)trans('config.month_and_day_js', [], $locale));
$chartData[$finalLabel] = $finalSum;
$data = $this->generator->singleSet($piggyBank->name, $chartData);

View File

@@ -114,7 +114,7 @@ class ReportController extends Controller
/** @var array $netWorthItem */
foreach ($result as $netWorthItem) {
$currencyId = $netWorthItem['currency']->id;
$label = $current->formatLocalized((string)trans('config.month_and_day', [], $locale));
$label = $current->isoFormat((string)trans('config.month_and_day_js', [], $locale));
if (!array_key_exists($currencyId, $chartData)) {
$chartData[$currencyId] = [
'label' => 'Net worth in ' . $netWorthItem['currency']->name,
@@ -239,7 +239,7 @@ class ReportController extends Controller
$currentStart = clone $start;
while ($currentStart <= $end) {
$key = $currentStart->format($format);
$title = $currentStart->formatLocalized($titleFormat);
$title = $currentStart->isoFormat($titleFormat);
$income['entries'][$title] = round((float)($currency[$key]['earned'] ?? '0'), $currency['currency_decimal_places']);
$expense['entries'][$title] = round((float)($currency[$key]['spent'] ?? '0'), $currency['currency_decimal_places']);
$currentStart = app('navigation')->addPeriod($currentStart, $preferredRange, 0);

View File

@@ -282,7 +282,7 @@ class TagReportController extends Controller
foreach ($currency['tags'] as $currentTag) {
foreach ($currentTag['transaction_journals'] as $journal) {
$key = $journal['date']->formatLocalized($format);
$key = $journal['date']->isoFormat($format);
$amount = app('steam')->positive($journal['amount']);
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
@@ -309,7 +309,7 @@ class TagReportController extends Controller
foreach ($currency['tags'] as $currentTag) {
foreach ($currentTag['transaction_journals'] as $journal) {
$key = $journal['date']->formatLocalized($format);
$key = $journal['date']->isoFormat($format);
$amount = app('steam')->positive($journal['amount']);
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
@@ -338,7 +338,7 @@ class TagReportController extends Controller
$currentStart = clone $start;
while ($currentStart <= $end) {
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
$key = $currentStart->formatLocalized($format);
$key = $currentStart->isoFormat($format);
$return[$key] = '0';
$currentStart = clone $currentEnd;
$currentStart->addDay()->startOfDay();

View File

@@ -92,9 +92,9 @@ abstract class Controller extends BaseController
function ($request, $next): mixed {
$locale = app('steam')->getLocale();
// translations for specific strings:
$this->monthFormat = (string)trans('config.month', [], $locale);
$this->monthAndDayFormat = (string)trans('config.month_and_day', [], $locale);
$this->dateTimeFormat = (string)trans('config.date_time', [], $locale);
$this->monthFormat = (string)trans('config.month_js', [], $locale);
$this->monthAndDayFormat = (string)trans('config.month_and_day_moment_js', [], $locale);
$this->dateTimeFormat = (string)trans('config.date_time_js', [], $locale);
// get shown-intro-preference:
if (auth()->check()) {

View File

@@ -50,7 +50,10 @@ class FrontpageController extends Controller
$amount = $repository->getCurrentAmount($piggyBank);
if (1 === bccomp($amount, '0')) {
// percentage!
$pct = round(($amount / $piggyBank->targetamount) * 100);
$pct = 0;
if(0.0 !== (float)$piggyBank->targetamount) {
$pct = round(($amount / $piggyBank->targetamount) * 100);
}
$entry = [
'id' => $piggyBank->id,

View File

@@ -163,7 +163,7 @@ class RecurrenceController extends Controller
$dayOfWeek = (string)trans(sprintf('config.dow_%s', $date->dayOfWeekIso));
$ndom = sprintf('ndom,%s,%s', $date->weekOfMonth, $date->dayOfWeekIso);
$yearly = sprintf('yearly,%s', $date->format('Y-m-d'));
$yearlyDate = $date->formatLocalized((string)trans('config.month_and_day_no_year', [], $locale));
$yearlyDate = $date->isoFormat((string)trans('config.month_and_day_no_year_js', [], $locale));
$result = [
'daily' => ['label' => (string)trans('firefly.recurring_daily'), 'selected' => str_starts_with($preSelected, 'daily')],
$weekly => ['label' => (string)trans('firefly.recurring_weekly', ['weekday' => $dayOfWeek]),

View File

@@ -385,7 +385,7 @@ class BudgetController extends Controller
'transaction_group_id' => $journal['transaction_group_id'],
'amount_float' => (float)$journal['amount'],
'amount' => $journal['amount'],
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
'date_sort' => $journal['date']->format('Y-m-d'),
'destination_account_name' => $journal['destination_account_name'],
'destination_account_id' => $journal['destination_account_id'],

View File

@@ -702,7 +702,7 @@ class CategoryController extends Controller
'transaction_group_id' => $journal['transaction_group_id'],
'amount_float' => (float)$journal['amount'],
'amount' => $journal['amount'],
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
'date_sort' => $journal['date']->format('Y-m-d'),
'destination_account_name' => $journal['destination_account_name'],
'destination_account_id' => $journal['destination_account_id'],
@@ -752,7 +752,7 @@ class CategoryController extends Controller
'transaction_group_id' => $journal['transaction_group_id'],
'amount_float' => (float)$journal['amount'],
'amount' => $journal['amount'],
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
'date_sort' => $journal['date']->format('Y-m-d'),
'source_account_name' => $journal['source_account_name'],
'source_account_id' => $journal['source_account_id'],

View File

@@ -437,7 +437,7 @@ class DoubleController extends Controller
'transaction_group_id' => $journal['transaction_group_id'],
'amount_float' => (float)$journal['amount'],
'amount' => $journal['amount'],
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
'date_sort' => $journal['date']->format('Y-m-d'),
'destination_account_name' => $journal['destination_account_name'],
'destination_account_id' => $journal['destination_account_id'],
@@ -487,7 +487,7 @@ class DoubleController extends Controller
'transaction_group_id' => $journal['transaction_group_id'],
'amount_float' => (float)$journal['amount'],
'amount' => $journal['amount'],
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
'date_sort' => $journal['date']->format('Y-m-d'),
'destination_account_name' => $journal['destination_account_name'],
'destination_account_id' => $journal['destination_account_id'],

View File

@@ -494,7 +494,7 @@ class TagController extends Controller
'transaction_group_id' => $journal['transaction_group_id'],
'amount_float' => (float)$journal['amount'],
'amount' => $journal['amount'],
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
'date_sort' => $journal['date']->format('Y-m-d'),
'destination_account_name' => $journal['destination_account_name'],
'destination_account_id' => $journal['destination_account_id'],
@@ -544,7 +544,7 @@ class TagController extends Controller
'transaction_group_id' => $journal['transaction_group_id'],
'amount_float' => (float)$journal['amount'],
'amount' => $journal['amount'],
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
'date_sort' => $journal['date']->format('Y-m-d'),
'source_account_name' => $journal['source_account_name'],
'source_account_id' => $journal['source_account_id'],

View File

@@ -98,8 +98,8 @@ class ReportController extends Controller
trans(
'firefly.report_audit',
[
'start' => $start->formatLocalized($this->monthAndDayFormat),
'end' => $end->formatLocalized($this->monthAndDayFormat),
'start' => $start->isoFormat($this->monthAndDayFormat),
'end' => $end->isoFormat($this->monthAndDayFormat),
]
)
);
@@ -134,8 +134,8 @@ class ReportController extends Controller
trans(
'firefly.report_budget',
[
'start' => $start->formatLocalized($this->monthAndDayFormat),
'end' => $end->formatLocalized($this->monthAndDayFormat),
'start' => $start->isoFormat($this->monthAndDayFormat),
'end' => $end->isoFormat($this->monthAndDayFormat),
]
)
);
@@ -171,8 +171,8 @@ class ReportController extends Controller
trans(
'firefly.report_category',
[
'start' => $start->formatLocalized($this->monthAndDayFormat),
'end' => $end->formatLocalized($this->monthAndDayFormat),
'start' => $start->isoFormat($this->monthAndDayFormat),
'end' => $end->isoFormat($this->monthAndDayFormat),
]
)
);
@@ -208,8 +208,8 @@ class ReportController extends Controller
trans(
'firefly.report_default',
[
'start' => $start->formatLocalized($this->monthAndDayFormat),
'end' => $end->formatLocalized($this->monthAndDayFormat),
'start' => $start->isoFormat($this->monthAndDayFormat),
'end' => $end->isoFormat($this->monthAndDayFormat),
]
)
);
@@ -243,7 +243,8 @@ class ReportController extends Controller
'subTitle',
trans(
'firefly.report_double',
['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)]
['start' => $start->isoFormat($this->monthAndDayFormat),
'end' => $end->isoFormat($this->monthAndDayFormat)]
)
);
@@ -409,8 +410,8 @@ class ReportController extends Controller
trans(
'firefly.report_tag',
[
'start' => $start->formatLocalized($this->monthAndDayFormat),
'end' => $end->formatLocalized($this->monthAndDayFormat),
'start' => $start->isoFormat($this->monthAndDayFormat),
'end' => $end->isoFormat($this->monthAndDayFormat),
]
)
);

View File

@@ -243,8 +243,8 @@ class TagController extends Controller
$attachments = $this->repository->getAttachments($tag);
$subTitle = trans(
'firefly.journals_in_period_for_tag',
['tag' => $tag->tag, 'start' => $start->formatLocalized($this->monthAndDayFormat),
'end' => $end->formatLocalized($this->monthAndDayFormat),]
['tag' => $tag->tag, 'start' => $start->isoFormat($this->monthAndDayFormat),
'end' => $end->isoFormat($this->monthAndDayFormat),]
);
$startPeriod = $this->repository->firstUseDate($tag);

View File

@@ -97,8 +97,8 @@ class IndexController extends Controller
[$start, $end] = $end < $start ? [$end, $start] : [$start, $end];
$path = route('transactions.index', [$objectType, $start->format('Y-m-d'), $end->format('Y-m-d')]);
$startStr = $start->formatLocalized($this->monthAndDayFormat);
$endStr = $end->formatLocalized($this->monthAndDayFormat);
$startStr = $start->isoFormat($this->monthAndDayFormat);
$endStr = $end->isoFormat($this->monthAndDayFormat);
$subTitle = (string)trans(sprintf('firefly.title_%s_between', $objectType), ['start' => $startStr, 'end' => $endStr]);
$firstJournal = $this->repository->firstNull();