From cbf14f541c3d940ba6971cf150eb5d14a6d11e6e Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 27 Mar 2022 20:24:13 +0200 Subject: [PATCH] Replace deprecated method. --- .../Report/Audit/MonthReportGenerator.php | 4 +- app/Helpers/Report/ReportHelper.php | 2 +- .../Account/ReconcileController.php | 3 +- .../Controllers/Account/ShowController.php | 4 +- .../Controllers/Budget/IndexController.php | 4 +- .../Controllers/Budget/ShowController.php | 6 +- .../Category/NoCategoryController.php | 2 +- .../Controllers/Category/ShowController.php | 4 +- .../Controllers/Chart/AccountController.php | 2 +- app/Http/Controllers/Chart/BillController.php | 2 +- .../Controllers/Chart/BudgetController.php | 6 +- .../Chart/BudgetReportController.php | 4 +- .../Controllers/Chart/CategoryController.php | 4 +- .../Chart/CategoryReportController.php | 6 +- .../Chart/DoubleReportController.php | 6 +- .../Chart/ExpenseReportController.php | 2 +- .../Controllers/Chart/PiggyBankController.php | 4 +- .../Controllers/Chart/ReportController.php | 4 +- .../Controllers/Chart/TagReportController.php | 6 +- app/Http/Controllers/Controller.php | 6 +- .../Controllers/Json/FrontpageController.php | 5 +- .../Controllers/Json/RecurrenceController.php | 2 +- .../Controllers/Report/BudgetController.php | 2 +- .../Controllers/Report/CategoryController.php | 4 +- .../Controllers/Report/DoubleController.php | 4 +- app/Http/Controllers/Report/TagController.php | 4 +- app/Http/Controllers/ReportController.php | 23 +++---- app/Http/Controllers/TagController.php | 4 +- .../Transaction/IndexController.php | 4 +- app/Mail/NewIPAddressWarningMail.php | 9 ++- .../Recurring/RecurringRepository.php | 2 +- .../FireflyIIIOrg/Update/UpdateRequest.php | 6 +- .../Chart/Budget/FrontpageChartGenerator.php | 4 +- .../Http/Controllers/ChartGeneration.php | 2 +- .../Http/Controllers/GetConfigurationData.php | 2 +- app/Support/Navigation.php | 10 +-- app/Support/Twig/General.php | 2 +- composer.lock | 63 +++++++++---------- resources/lang/en_US/config.php | 30 ++++++--- 39 files changed, 140 insertions(+), 123 deletions(-) diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.php index 1895916c37..fedc65ffb7 100644 --- a/app/Generator/Report/Audit/MonthReportGenerator.php +++ b/app/Generator/Report/Audit/MonthReportGenerator.php @@ -255,9 +255,9 @@ class MonthReportGenerator implements ReportGeneratorInterface 'journals' => $journals, 'currency' => $currency, 'exists' => !empty($journals), - 'end' => $this->end->formatLocalized((string)trans('config.month_and_day', [], $locale)), + 'end' => $this->end->isoFormat((string)trans('config.month_and_day_moment_js', [], $locale)), 'endBalance' => app('steam')->balance($account, $this->end), - 'dayBefore' => $date->formatLocalized((string)trans('config.month_and_day', [], $locale)), + 'dayBefore' => $date->isoFormat((string)trans('config.month_and_day_moment_js', [], $locale)), 'dayBeforeBalance' => $dayBeforeBalance, ]; } diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index 0c2c2b5e15..ddbe302068 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -141,7 +141,7 @@ class ReportHelper implements ReportHelperInterface $currentEnd = clone $start; $currentEnd->endOfMonth(); $months[$year]['months'][] = [ - 'formatted' => $start->formatLocalized('%B %Y'), + 'formatted' => $start->isoFormat((string)trans('config.month_js')), 'start' => $start->format('Y-m-d'), 'end' => $currentEnd->format('Y-m-d'), 'month' => $start->month, diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.php index 4ac2b31640..22dc2e5b1a 100644 --- a/app/Http/Controllers/Account/ReconcileController.php +++ b/app/Http/Controllers/Account/ReconcileController.php @@ -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, diff --git a/app/Http/Controllers/Account/ShowController.php b/app/Http/Controllers/Account/ShowController.php index df37b3168b..2fef4f3f1b 100644 --- a/app/Http/Controllers/Account/ShowController.php +++ b/app/Http/Controllers/Account/ShowController.php @@ -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; diff --git a/app/Http/Controllers/Budget/IndexController.php b/app/Http/Controllers/Budget/IndexController.php index 1342b0e36d..abc9a52e46 100644 --- a/app/Http/Controllers/Budget/IndexController.php +++ b/app/Http/Controllers/Budget/IndexController.php @@ -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, diff --git a/app/Http/Controllers/Budget/ShowController.php b/app/Http/Controllers/Budget/ShowController.php index 3d9d7f774d..10b4e4093b 100644 --- a/app/Http/Controllers/Budget/ShowController.php +++ b/app/Http/Controllers/Budget/ShowController.php @@ -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, ] ); diff --git a/app/Http/Controllers/Category/NoCategoryController.php b/app/Http/Controllers/Category/NoCategoryController.php index fa681db856..669c740520 100644 --- a/app/Http/Controllers/Category/NoCategoryController.php +++ b/app/Http/Controllers/Category/NoCategoryController.php @@ -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); diff --git a/app/Http/Controllers/Category/ShowController.php b/app/Http/Controllers/Category/ShowController.php index 80325cdb26..b8d82118f0 100644 --- a/app/Http/Controllers/Category/ShowController.php +++ b/app/Http/Controllers/Category/ShowController.php @@ -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 */ diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php index b8b03d2a7c..16d12aec1f 100644 --- a/app/Http/Controllers/Chart/AccountController.php +++ b/app/Http/Controllers/Chart/AccountController.php @@ -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(); diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.php index b857e1a85b..04ac829d35 100644 --- a/app/Http/Controllers/Chart/BillController.php +++ b/app/Http/Controllers/Chart/BillController.php @@ -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 diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index d55ebbbe19..bff5b7848f 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -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); diff --git a/app/Http/Controllers/Chart/BudgetReportController.php b/app/Http/Controllers/Chart/BudgetReportController.php index 69bf517433..a015cd1153 100644 --- a/app/Http/Controllers/Chart/BudgetReportController.php +++ b/app/Http/Controllers/Chart/BudgetReportController.php @@ -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(); diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index 09c56ad6e5..2aee37c520 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -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]); } diff --git a/app/Http/Controllers/Chart/CategoryReportController.php b/app/Http/Controllers/Chart/CategoryReportController.php index 8e5e359859..57be9d9205 100644 --- a/app/Http/Controllers/Chart/CategoryReportController.php +++ b/app/Http/Controllers/Chart/CategoryReportController.php @@ -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(); diff --git a/app/Http/Controllers/Chart/DoubleReportController.php b/app/Http/Controllers/Chart/DoubleReportController.php index 13a86622d6..9e4e317f7f 100644 --- a/app/Http/Controllers/Chart/DoubleReportController.php +++ b/app/Http/Controllers/Chart/DoubleReportController.php @@ -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(); diff --git a/app/Http/Controllers/Chart/ExpenseReportController.php b/app/Http/Controllers/Chart/ExpenseReportController.php index 697cfb6ee4..3fbac308c7 100644 --- a/app/Http/Controllers/Chart/ExpenseReportController.php +++ b/app/Http/Controllers/Chart/ExpenseReportController.php @@ -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: diff --git a/app/Http/Controllers/Chart/PiggyBankController.php b/app/Http/Controllers/Chart/PiggyBankController.php index 54ddd642f9..e126d4eefc 100644 --- a/app/Http/Controllers/Chart/PiggyBankController.php +++ b/app/Http/Controllers/Chart/PiggyBankController.php @@ -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); diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index 3062386453..f3ec2a6229 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -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); diff --git a/app/Http/Controllers/Chart/TagReportController.php b/app/Http/Controllers/Chart/TagReportController.php index 3a77762e19..389ff39420 100644 --- a/app/Http/Controllers/Chart/TagReportController.php +++ b/app/Http/Controllers/Chart/TagReportController.php @@ -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(); diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 5031532dfb..445c2021c2 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -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()) { diff --git a/app/Http/Controllers/Json/FrontpageController.php b/app/Http/Controllers/Json/FrontpageController.php index 60bf987c54..c881f2af3f 100644 --- a/app/Http/Controllers/Json/FrontpageController.php +++ b/app/Http/Controllers/Json/FrontpageController.php @@ -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, diff --git a/app/Http/Controllers/Json/RecurrenceController.php b/app/Http/Controllers/Json/RecurrenceController.php index bdd6ee25d4..eb313c13db 100644 --- a/app/Http/Controllers/Json/RecurrenceController.php +++ b/app/Http/Controllers/Json/RecurrenceController.php @@ -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]), diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.php index 4f61005931..31b5d4d0f0 100644 --- a/app/Http/Controllers/Report/BudgetController.php +++ b/app/Http/Controllers/Report/BudgetController.php @@ -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'], diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index 41b9193e4c..27f56c1f0e 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -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'], diff --git a/app/Http/Controllers/Report/DoubleController.php b/app/Http/Controllers/Report/DoubleController.php index 387639f318..29f7cb2dce 100644 --- a/app/Http/Controllers/Report/DoubleController.php +++ b/app/Http/Controllers/Report/DoubleController.php @@ -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'], diff --git a/app/Http/Controllers/Report/TagController.php b/app/Http/Controllers/Report/TagController.php index 476f9f8b3f..2c97d54caa 100644 --- a/app/Http/Controllers/Report/TagController.php +++ b/app/Http/Controllers/Report/TagController.php @@ -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'], diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 9f5ad667b8..335267ee5d 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -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), ] ) ); diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index d7d5c7092c..9381a2dbd3 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -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); diff --git a/app/Http/Controllers/Transaction/IndexController.php b/app/Http/Controllers/Transaction/IndexController.php index adc0eaa590..6ab707baf1 100644 --- a/app/Http/Controllers/Transaction/IndexController.php +++ b/app/Http/Controllers/Transaction/IndexController.php @@ -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(); diff --git a/app/Mail/NewIPAddressWarningMail.php b/app/Mail/NewIPAddressWarningMail.php index bf27fd2a29..034873fae5 100644 --- a/app/Mail/NewIPAddressWarningMail.php +++ b/app/Mail/NewIPAddressWarningMail.php @@ -57,9 +57,14 @@ class NewIPAddressWarningMail extends Mailable public function build(): self { // time - $this->time = now()->formatLocalized((string)trans('config.date_time')); + + $this->time = now(config('app.timezone'))->isoFormat((string)trans('config.date_time_js')); $this->host = ''; - $hostName = gethostbyaddr($this->ipAddress); + try { + $hostName = gethostbyaddr($this->ipAddress); + } catch(\Exception $e) { + $hostName = $this->ipAddress; + } if ($hostName !== $this->ipAddress) { $this->host = $hostName; } diff --git a/app/Repositories/Recurring/RecurringRepository.php b/app/Repositories/Recurring/RecurringRepository.php index 8e2216d3c4..40ab69cb05 100644 --- a/app/Repositories/Recurring/RecurringRepository.php +++ b/app/Repositories/Recurring/RecurringRepository.php @@ -499,7 +499,7 @@ class RecurringRepository implements RecurringRepositoryInterface $repDate = Carbon::createFromFormat('Y-m-d', $repetition->repetition_moment); $diffInYears = $today->diffInYears($repDate); $repDate->addYears($diffInYears); // technically not necessary. - $string = $repDate->formatLocalized((string)trans('config.month_and_day_no_year')); + $string = $repDate->isoFormat((string)trans('config.month_and_day_no_year_js')); return (string)trans('firefly.recurring_yearly', ['date' => $string], $language); } diff --git a/app/Services/FireflyIIIOrg/Update/UpdateRequest.php b/app/Services/FireflyIIIOrg/Update/UpdateRequest.php index 7aed47deb5..9d5deae09b 100644 --- a/app/Services/FireflyIIIOrg/Update/UpdateRequest.php +++ b/app/Services/FireflyIIIOrg/Update/UpdateRequest.php @@ -180,7 +180,7 @@ class UpdateRequest implements UpdateRequestInterface $return['message'] = (string)trans( 'firefly.just_new_release', ['version' => $latest, - 'date' => $released->formatLocalized((string)trans('config.month_and_day')), + 'date' => $released->isoFormat((string)trans('config.month_and_day_js')), 'days' => $expectedDiff, ] ); @@ -196,9 +196,7 @@ class UpdateRequest implements UpdateRequestInterface [ 'your_version' => $current, 'new_version' => $latest, - 'date' => $released->formatLocalized( - (string)trans('config.month_and_day') - )] + 'date' => $released->isoFormat((string)trans('config.month_and_day_js'))] ); Log::debug('New release is old enough.'); diff --git a/app/Support/Chart/Budget/FrontpageChartGenerator.php b/app/Support/Chart/Budget/FrontpageChartGenerator.php index e2d5dc435f..26ee353122 100644 --- a/app/Support/Chart/Budget/FrontpageChartGenerator.php +++ b/app/Support/Chart/Budget/FrontpageChartGenerator.php @@ -187,8 +187,8 @@ class FrontpageChartGenerator '%s (%s) (%s - %s)', $budget->name, $entry['currency_name'], - $limit->start_date->formatLocalized($this->monthAndDayFormat), - $limit->end_date->formatLocalized($this->monthAndDayFormat) + $limit->start_date->isoFormat($this->monthAndDayFormat), + $limit->end_date->isoFormat($this->monthAndDayFormat) ); } $sumSpent = bcmul($entry['sum'], '-1'); // spent diff --git a/app/Support/Http/Controllers/ChartGeneration.php b/app/Support/Http/Controllers/ChartGeneration.php index 930269e701..7653ff38fc 100644 --- a/app/Support/Http/Controllers/ChartGeneration.php +++ b/app/Support/Http/Controllers/ChartGeneration.php @@ -92,7 +92,7 @@ trait ChartGeneration $previous = array_values($range)[0]; while ($currentStart <= $end) { $format = $currentStart->format('Y-m-d'); - $label = trim($currentStart->formatLocalized((string)trans('config.month_and_day', [], $locale))); + $label = trim($currentStart->isoFormat((string)trans('config.month_and_day_js', [], $locale))); $balance = $range[$format] ?? $previous; $previous = $balance; $currentStart->addDay(); diff --git a/app/Support/Http/Controllers/GetConfigurationData.php b/app/Support/Http/Controllers/GetConfigurationData.php index eb473a1f47..a9567e8500 100644 --- a/app/Support/Http/Controllers/GetConfigurationData.php +++ b/app/Support/Http/Controllers/GetConfigurationData.php @@ -98,7 +98,7 @@ trait GetConfigurationData $end = session('end'); /** @var Carbon $first */ $first = session('first'); - $title = sprintf('%s - %s', $start->formatLocalized($this->monthAndDayFormat), $end->formatLocalized($this->monthAndDayFormat)); + $title = sprintf('%s - %s', $start->isoFormat($this->monthAndDayFormat), $end->isoFormat($this->monthAndDayFormat)); $isCustom = true === session('is_custom_range', false); $today = today(config('app.timezone')); $ranges = [ diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index 437c0e23e0..1cac73859e 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -356,7 +356,7 @@ class Navigation $entries = []; while ($begin < $end) { $formatted = $begin->format($format); - $displayed = $begin->formatLocalized($displayFormat); + $displayed = $begin->isoFormat($displayFormat); $entries[$formatted] = $displayed; $begin->$increment(); } @@ -413,7 +413,7 @@ class Navigation ]; if (array_key_exists($repeatFrequency, $formatMap)) { - return $date->formatLocalized((string)$formatMap[$repeatFrequency]); + return $date->isoFormat((string)$formatMap[$repeatFrequency]); } if ('3M' === $repeatFrequency || 'quarter' === $repeatFrequency) { $quarter = ceil($theDate->month / 3); @@ -440,13 +440,13 @@ class Navigation public function preferredCarbonLocalizedFormat(Carbon $start, Carbon $end): string { $locale = app('steam')->getLocale(); - $format = (string)trans('config.month_and_day', [], $locale); + $format = (string)trans('config.month_and_day_js', [], $locale); if ($start->diffInMonths($end) > 1) { - $format = (string)trans('config.month', [], $locale); + $format = (string)trans('config.month_js', [], $locale); } if ($start->diffInMonths($end) > 12) { - $format = (string)trans('config.year', [], $locale); + $format = (string)trans('config.year_js', [], $locale); } return $format; diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.php index 29e3b58c51..d5bb131df4 100644 --- a/app/Support/Twig/General.php +++ b/app/Support/Twig/General.php @@ -369,7 +369,7 @@ class General extends AbstractExtension function (string $date, string $format): string { $carbon = new Carbon($date); - return $carbon->formatLocalized($format); + return $carbon->isoFormat($format); } ); } diff --git a/composer.lock b/composer.lock index 12de6cafc7..54a67afb5a 100644 --- a/composer.lock +++ b/composer.lock @@ -480,16 +480,16 @@ }, { "name": "doctrine/dbal", - "version": "3.3.3", + "version": "3.3.4", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "82331b861727c15b1f457ef05a8729e508e7ead5" + "reference": "83f779beaea1893c0bece093ab2104c6d15a7f26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/82331b861727c15b1f457ef05a8729e508e7ead5", - "reference": "82331b861727c15b1f457ef05a8729e508e7ead5", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/83f779beaea1893c0bece093ab2104c6d15a7f26", + "reference": "83f779beaea1893c0bece093ab2104c6d15a7f26", "shasum": "" }, "require": { @@ -571,7 +571,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.3.3" + "source": "https://github.com/doctrine/dbal/tree/3.3.4" }, "funding": [ { @@ -587,7 +587,7 @@ "type": "tidelift" } ], - "time": "2022-03-09T15:39:50+00:00" + "time": "2022-03-20T18:37:29+00:00" }, { "name": "doctrine/deprecations", @@ -4768,25 +4768,24 @@ }, { "name": "ramsey/uuid", - "version": "4.2.3", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" + "reference": "8ced2afadd9ce455e2d5919d27c57e344bae4a09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/8ced2afadd9ce455e2d5919d27c57e344bae4a09", + "reference": "8ced2afadd9ce455e2d5919d27c57e344bae4a09", "shasum": "" }, "require": { "brick/math": "^0.8 || ^0.9", + "ext-ctype": "*", "ext-json": "*", - "php": "^7.2 || ^8.0", - "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php80": "^1.14" + "php": "^8.0", + "ramsey/collection": "^1.0" }, "replace": { "rhumsaa/uuid": "self.version" @@ -4850,7 +4849,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.2.3" + "source": "https://github.com/ramsey/uuid/tree/4.3.0" }, "funding": [ { @@ -4862,7 +4861,7 @@ "type": "tidelift" } ], - "time": "2021-09-25T23:10:38+00:00" + "time": "2022-03-26T22:00:50+00:00" }, { "name": "rcrowe/twigbridge", @@ -5131,16 +5130,16 @@ }, { "name": "spatie/ignition", - "version": "1.2.5", + "version": "1.2.6", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "982f69f3c2e525cef62fa23ada047d745e4bcda9" + "reference": "be24d33a9de271638314924b5da85e168e4148e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/982f69f3c2e525cef62fa23ada047d745e4bcda9", - "reference": "982f69f3c2e525cef62fa23ada047d745e4bcda9", + "url": "https://api.github.com/repos/spatie/ignition/zipball/be24d33a9de271638314924b5da85e168e4148e4", + "reference": "be24d33a9de271638314924b5da85e168e4148e4", "shasum": "" }, "require": { @@ -5197,20 +5196,20 @@ "type": "github" } ], - "time": "2022-03-19T14:07:30+00:00" + "time": "2022-03-23T11:02:14+00:00" }, { "name": "spatie/laravel-ignition", - "version": "1.1.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "5b8c360d1f6bcba339a6d593efa02816c06d17c3" + "reference": "f3243fd99351e0a79df6886a5354d8dd88d6d0d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/5b8c360d1f6bcba339a6d593efa02816c06d17c3", - "reference": "5b8c360d1f6bcba339a6d593efa02816c06d17c3", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/f3243fd99351e0a79df6886a5354d8dd88d6d0d2", + "reference": "f3243fd99351e0a79df6886a5354d8dd88d6d0d2", "shasum": "" }, "require": { @@ -5284,7 +5283,7 @@ "type": "github" } ], - "time": "2022-03-19T17:03:56+00:00" + "time": "2022-03-21T07:13:26+00:00" }, { "name": "symfony/console", @@ -7745,16 +7744,16 @@ }, { "name": "twig/twig", - "version": "v3.3.8", + "version": "v3.3.9", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "972d8604a92b7054828b539f2febb0211dd5945c" + "reference": "6ff9b0e440fa66f97f207e181c41340ddfa5683d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c", - "reference": "972d8604a92b7054828b539f2febb0211dd5945c", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/6ff9b0e440fa66f97f207e181c41340ddfa5683d", + "reference": "6ff9b0e440fa66f97f207e181c41340ddfa5683d", "shasum": "" }, "require": { @@ -7805,7 +7804,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.3.8" + "source": "https://github.com/twigphp/Twig/tree/v3.3.9" }, "funding": [ { @@ -7817,7 +7816,7 @@ "type": "tidelift" } ], - "time": "2022-02-04T06:59:48+00:00" + "time": "2022-03-25T09:37:52+00:00" }, { "name": "vlucas/phpdotenv", diff --git a/resources/lang/en_US/config.php b/resources/lang/en_US/config.php index c4bf677c5e..35df8fbdc5 100644 --- a/resources/lang/en_US/config.php +++ b/resources/lang/en_US/config.php @@ -25,25 +25,35 @@ declare(strict_types=1); return [ 'html_language' => 'en', 'locale' => 'en, English, en_US.utf8, en_US.UTF-8', - 'month' => '%B %Y', - 'month_and_day' => '%B %e, %Y', + //'month' => '%B %Y', + 'month_js' => 'MMMM YYYY', + + //'month_and_day' => '%B %e, %Y', 'month_and_day_moment_js' => 'MMM D, YYYY', 'month_and_day_fns' => 'MMMM d, y', - 'month_and_date_day' => '%A %B %e, %Y', - 'month_and_day_no_year' => '%B %e', - 'date_time' => '%B %e, %Y, @ %T', - 'specific_day' => '%e %B %Y', - 'week_in_year' => 'Week %V, %G', - 'year' => '%Y', - 'half_year' => '%B %Y', - 'month_js' => 'MMMM YYYY', 'month_and_day_js' => 'MMMM Do, YYYY', + + //'month_and_date_day' => '%A %B %e, %Y', + + //'month_and_day_no_year' => '%B %e', + 'month_and_day_no_year_js' => 'MMMM Do', + + //'date_time' => '%B %e, %Y, @ %T', 'date_time_js' => 'MMMM Do, YYYY, @ HH:mm:ss', + + //'specific_day' => '%e %B %Y', 'specific_day_js' => 'D MMMM YYYY', + + //'week_in_year' => 'Week %V, %G', 'week_in_year_js' => '[Week] w, YYYY', 'week_in_year_fns' => "'Week' w, yyyy", + + //'year' => '%Y', 'year_js' => 'YYYY', + + //'half_year' => '%B %Y', 'half_year_js' => 'Q YYYY', + 'quarter_fns' => "'Q'Q, yyyy", 'half_year_fns' => "'H{half}', yyyy", 'dow_1' => 'Monday',