diff --git a/app/Http/Middleware/Range.php b/app/Http/Middleware/Range.php index 4a64f3989d..1d590443b2 100644 --- a/app/Http/Middleware/Range.php +++ b/app/Http/Middleware/Range.php @@ -113,8 +113,8 @@ class Range } // save some formats: - $monthAndDayFormat = (string)trans('config.month_and_day', [], $locale); - $dateTimeFormat = (string)trans('config.date_time', [], $locale); + $monthAndDayFormat = (string)trans('config.month_and_day_js', [], $locale); + $dateTimeFormat = (string)trans('config.date_time_js', [], $locale); $defaultCurrency = app('amount')->getDefaultCurrency(); // also format for moment JS: diff --git a/resources/lang/en_US/config.php b/resources/lang/en_US/config.php index 35df8fbdc5..b097328550 100644 --- a/resources/lang/en_US/config.php +++ b/resources/lang/en_US/config.php @@ -34,6 +34,7 @@ return [ 'month_and_day_js' => 'MMMM Do, YYYY', //'month_and_date_day' => '%A %B %e, %Y', + 'month_and_date_day_js' => 'dddd MMMM Do, YYYY', //'month_and_day_no_year' => '%B %e', 'month_and_day_no_year_js' => 'MMMM Do', diff --git a/resources/views/accounts/reconcile/edit.twig b/resources/views/accounts/reconcile/edit.twig index 852cf47d6b..9eb2e06b99 100644 --- a/resources/views/accounts/reconcile/edit.twig +++ b/resources/views/accounts/reconcile/edit.twig @@ -39,7 +39,7 @@ {{ ExpandedForm.nonSelectableAmount('amount',data.amount, {'currency' : data.currency}) }} {# ALWAYS SHOW DATE #} - {{ ExpandedForm.staticText('date',journal.date.formatLocalized(monthAndDayFormat)) }} + {{ ExpandedForm.staticText('date',journal.date.isoFormat(monthAndDayFormat)) }} diff --git a/resources/views/accounts/reconcile/overview.twig b/resources/views/accounts/reconcile/overview.twig index 7116cf6ed4..914a897bf6 100644 --- a/resources/views/accounts/reconcile/overview.twig +++ b/resources/views/accounts/reconcile/overview.twig @@ -21,7 +21,7 @@ - + @@ -33,7 +33,7 @@ - + diff --git a/resources/views/accounts/reconcile/show.twig b/resources/views/accounts/reconcile/show.twig index 92e4b6e535..dd503dec9c 100644 --- a/resources/views/accounts/reconcile/show.twig +++ b/resources/views/accounts/reconcile/show.twig @@ -44,7 +44,7 @@ - +
{{ 'submitted_start_balance'|_ }} ({{ start.formatLocalized(monthAndDayFormat) }}){{ 'submitted_start_balance'|_ }} ({{ start.isoFormat(monthAndDayFormat) }}) {{ formatAmountByAccount(account, startBalance) }}
{{ formatAmountByAccount(account, clearedAmount) }}
{{ 'submitted_end_balance'|_ }} ({{ end.formatLocalized(monthAndDayFormat) }}){{ 'submitted_end_balance'|_ }} ({{ end.isoFormat(monthAndDayFormat) }}) {{ formatAmountByAccount(account, endBalance) }}
{{ trans('list.date') }}{{ journal.date.formatLocalized(monthAndDayFormat) }}{{ journal.date.isoFormat(monthAndDayFormat) }}
diff --git a/resources/views/accounts/reconcile/transactions.twig b/resources/views/accounts/reconcile/transactions.twig index 0b3389205e..891e988d8c 100644 --- a/resources/views/accounts/reconcile/transactions.twig +++ b/resources/views/accounts/reconcile/transactions.twig @@ -28,7 +28,7 @@ - {{ trans('firefly.start_of_reconcile_period', {period: start.formatLocalized(monthAndDayFormat) }) }} + {{ trans('firefly.start_of_reconcile_period', {period: start.isoFormat(monthAndDayFormat) }) }} @@ -49,7 +49,7 @@ - {{ trans('firefly.end_of_reconcile_period', {period: end.formatLocalized(monthAndDayFormat) }) }} + {{ trans('firefly.end_of_reconcile_period', {period: end.isoFormat(monthAndDayFormat) }) }} @@ -133,7 +133,7 @@ - {{ journal.date.formatLocalized(monthAndDayFormat) }} + {{ journal.date.isoFormat(monthAndDayFormat) }} @@ -163,7 +163,7 @@ - {{ trans('firefly.start_of_reconcile_period', {period: start.formatLocalized(monthAndDayFormat) }) }} + {{ trans('firefly.start_of_reconcile_period', {period: start.isoFormat(monthAndDayFormat) }) }} diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig index b6d45b3a14..6eb878e1a8 100644 --- a/resources/views/accounts/show.twig +++ b/resources/views/accounts/show.twig @@ -13,7 +13,7 @@

{{ trans('firefly.chart_account_in_period', { balance: formatAmountBySymbol(balance, currency.symbol, currency.decimal_places, true), - name: account.name|escape, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat) })|raw }} + name: account.name|escape, start: start.isoFormat(monthAndDayFormat), end: end.isoFormat(monthAndDayFormat) })|raw }}

@@ -193,7 +193,7 @@ var drawVerticalLine = ''; {# render vertical line with text "today" #} {% if start.lte(today) and end.gte(today) %} - drawVerticalLine = '{{ today.formatLocalized(monthAndDayFormat) }}'; + drawVerticalLine = '{{ today.isoFormat(monthAndDayFormat) }}'; {% endif %} {% endif %} diff --git a/resources/views/admin/users/index.twig b/resources/views/admin/users/index.twig index d8c8129119..426fba58d5 100644 --- a/resources/views/admin/users/index.twig +++ b/resources/views/admin/users/index.twig @@ -37,11 +37,11 @@ {{ user.email }} - {{ user.created_at.formatLocalized(monthAndDayFormat) }} + {{ user.created_at.isoFormat(monthAndDayFormat) }} {{ user.created_at.format('H:i') }} - {{ user.updated_at.formatLocalized(monthAndDayFormat) }} + {{ user.updated_at.isoFormat(monthAndDayFormat) }} {{ user.updated_at.format('H:i') }} diff --git a/resources/views/admin/users/show.twig b/resources/views/admin/users/show.twig index 7945607bd5..04aef4cd7e 100644 --- a/resources/views/admin/users/show.twig +++ b/resources/views/admin/users/show.twig @@ -25,7 +25,7 @@ {{ trans('list.created_at') }} - {{ user.created_at.formatLocalized(monthAndDayFormat) }} + {{ user.created_at.isoFormat(monthAndDayFormat) }} {{ user.created_at.format('H:i') }} diff --git a/resources/views/budgets/available-budgets/create-alternative.twig b/resources/views/budgets/available-budgets/create-alternative.twig index d212385217..126dbb4713 100644 --- a/resources/views/budgets/available-budgets/create-alternative.twig +++ b/resources/views/budgets/available-budgets/create-alternative.twig @@ -5,7 +5,7 @@
diff --git a/resources/views/budgets/available-budgets/create.twig b/resources/views/budgets/available-budgets/create.twig index 9a77295ea4..a26a0933e5 100644 --- a/resources/views/budgets/available-budgets/create.twig +++ b/resources/views/budgets/available-budgets/create.twig @@ -5,7 +5,7 @@
diff --git a/resources/views/budgets/available-budgets/edit.twig b/resources/views/budgets/available-budgets/edit.twig index bdb04fc34b..aeec8fdc1d 100644 --- a/resources/views/budgets/available-budgets/edit.twig +++ b/resources/views/budgets/available-budgets/edit.twig @@ -5,7 +5,7 @@ diff --git a/resources/views/budgets/budget-limits/create.twig b/resources/views/budgets/budget-limits/create.twig index be92a9849b..ce0c05d06a 100644 --- a/resources/views/budgets/budget-limits/create.twig +++ b/resources/views/budgets/budget-limits/create.twig @@ -5,7 +5,7 @@ diff --git a/resources/views/budgets/index.twig b/resources/views/budgets/index.twig index ebd3de9690..3494c525b1 100644 --- a/resources/views/budgets/index.twig +++ b/resources/views/budgets/index.twig @@ -27,7 +27,7 @@
- {{ periodTitle }} {{ trans('firefly.total_available_budget_in_currency', {currency: defaultCurrency.name}) }}
- {{ trans('firefly.between_dates_breadcrumb', {start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }} + {{ trans('firefly.between_dates_breadcrumb', {start: start.isoFormat(monthAndDayFormat), end: end.isoFormat(monthAndDayFormat)}) }}
@@ -73,7 +73,7 @@ {# info about the amount spent #}
{{ trans('firefly.available_between', {start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat) }) }} + data-id="0">{{ trans('firefly.available_between', {start: start.isoFormat(monthAndDayFormat), end: end.isoFormat(monthAndDayFormat) }) }} : {{ formatAmountBySymbol(0, defaultCurrency.symbol, defaultCurrency.decimal_places, true) }} @@ -84,7 +84,7 @@ {# info text to show how much is spent (in currency). #}
- {{ trans('firefly.spent_between', {start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }} + {{ trans('firefly.spent_between', {start: start.isoFormat(monthAndDayFormat), end: end.isoFormat(monthAndDayFormat)}) }} : {{ formatAmountBySymbol(spent, defaultCurrency.symbol, defaultCurrency.decimal_places) }}
@@ -116,7 +116,7 @@

{{ trans('firefly.total_available_budget_in_currency', {currency: budget.transaction_currency.name}) }}
- {{ trans('firefly.between_dates_breadcrumb', {start: budget.start_date.formatLocalized(monthAndDayFormat), end: budget.end_date.formatLocalized(monthAndDayFormat)}) }} + {{ trans('firefly.between_dates_breadcrumb', {start: budget.start_date.isoFormat(monthAndDayFormat), end: budget.end_date.isoFormat(monthAndDayFormat)}) }}

@@ -132,7 +132,7 @@ {# info about the amount spent #}
{{ trans('firefly.available_between', {start: budget.start_date.formatLocalized(monthAndDayFormat), end: budget.end_date.formatLocalized(monthAndDayFormat) }) }} + data-id="{{ budget.id }}">{{ trans('firefly.available_between', {start: budget.start_date.isoFormat(monthAndDayFormat), end: budget.end_date.isoFormat(monthAndDayFormat) }) }} : {{ formatAmountBySymbol(budget.amount, budget.transaction_currency.symbol, budget.transaction_currency.decimal_places, true) }} @@ -166,7 +166,7 @@ {# info text to show how much is spent (in currency). #}
- {{ trans('firefly.spent_between', {start: budget.start_date.formatLocalized(monthAndDayFormat), end: budget.end_date.formatLocalized(monthAndDayFormat)}) }} + {{ trans('firefly.spent_between', {start: budget.start_date.isoFormat(monthAndDayFormat), end: budget.end_date.isoFormat(monthAndDayFormat)}) }} : {{ formatAmountBySymbol(budget.spent, budget.transaction_currency.symbol, budget.transaction_currency.decimal_places) }}
@@ -408,7 +408,7 @@
diff --git a/resources/views/budgets/show.twig b/resources/views/budgets/show.twig index 5f501882f7..059b10de74 100644 --- a/resources/views/budgets/show.twig +++ b/resources/views/budgets/show.twig @@ -11,7 +11,7 @@

{% if budgetLimit %} - {{ trans('firefly.chart_budget_in_period', {name: budget.name, start: budgetLimit.start_date.formatLocalized(monthAndDayFormat), end: budgetLimit.end_date.formatLocalized(monthAndDayFormat),currency: budgetLimit.transactionCurrency.name }) }} + {{ trans('firefly.chart_budget_in_period', {name: budget.name, start: budgetLimit.start_date.isoFormat(monthAndDayFormat), end: budgetLimit.end_date.isoFormat(monthAndDayFormat),currency: budgetLimit.transactionCurrency.name }) }} {% else %} {{ trans('firefly.chart_all_journals_for_budget', {name:budget.name}) }} {% endif %} @@ -147,8 +147,8 @@ diff --git a/resources/views/categories/show.twig b/resources/views/categories/show.twig index cb9786cd55..923f307a51 100644 --- a/resources/views/categories/show.twig +++ b/resources/views/categories/show.twig @@ -12,7 +12,7 @@

- {{ trans('firefly.chart_category_in_period', {name: category.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat) }) }} + {{ trans('firefly.chart_category_in_period', {name: category.name, start: start.isoFormat(monthAndDayFormat), end: end.isoFormat(monthAndDayFormat) }) }}

diff --git a/resources/views/index.twig b/resources/views/index.twig index 7f8d544df3..5d7b5c9bea 100644 --- a/resources/views/index.twig +++ b/resources/views/index.twig @@ -177,7 +177,7 @@ var drawVerticalLine = ''; {# render vertical line with text "today" #} {% if start.lte(today) and end.gte(today) %} - drawVerticalLine = '{{ today.formatLocalized(monthAndDayFormat) }}'; + drawVerticalLine = '{{ today.isoFormat(monthAndDayFormat) }}'; {% endif %} diff --git a/resources/views/list/accounts.twig b/resources/views/list/accounts.twig index c470d93b5a..4108e9625a 100644 --- a/resources/views/list/accounts.twig +++ b/resources/views/list/accounts.twig @@ -85,7 +85,7 @@ {% if account.lastActivityDate %} - {{ account.lastActivityDate.formatLocalized(monthAndDayFormat) }} + {{ account.lastActivityDate.isoFormat(monthAndDayFormat) }} {% else %} diff --git a/resources/views/list/categories.twig b/resources/views/list/categories.twig index 7438f4311e..81686e662d 100644 --- a/resources/views/list/categories.twig +++ b/resources/views/list/categories.twig @@ -31,7 +31,7 @@ {% if category.lastActivity %} - {{ category.lastActivity.formatLocalized(monthAndDayFormat) }} + {{ category.lastActivity.isoFormat(monthAndDayFormat) }} {% else %} diff --git a/resources/views/list/groups.twig b/resources/views/list/groups.twig index 4548c33a3c..3be6a895b9 100644 --- a/resources/views/list/groups.twig +++ b/resources/views/list/groups.twig @@ -204,7 +204,7 @@ {% endif %} - {{ transaction.date.formatLocalized(monthAndDayFormat) }} + {{ transaction.date.isoFormat(monthAndDayFormat) }} {% if 'Cash account' == transaction.source_account_type %} diff --git a/resources/views/list/piggy-bank-events.twig b/resources/views/list/piggy-bank-events.twig index 26765de16d..e89391c1b9 100644 --- a/resources/views/list/piggy-bank-events.twig +++ b/resources/views/list/piggy-bank-events.twig @@ -16,9 +16,9 @@ {% if event.transaction_journal_id %} {{ event.date.formatLocalized(monthAndDayFormat) }} + title="{{ event.transactionJournal.description }}">{{ event.date.isoFormat(monthAndDayFormat) }} {% else %} - {{ event.date.formatLocalized(monthAndDayFormat) }} + {{ event.date.isoFormat(monthAndDayFormat) }} {% endif %} diff --git a/resources/views/piggy-banks/show.twig b/resources/views/piggy-banks/show.twig index d4dfbbe2a1..1615c4fafc 100644 --- a/resources/views/piggy-banks/show.twig +++ b/resources/views/piggy-banks/show.twig @@ -68,7 +68,7 @@ {{ 'start_date'|_ }} {% if piggyBank.startdate %} - {{ piggyBank.startdate.formatLocalized(monthAndDayFormat) }} + {{ piggyBank.startdate.isoFormat(monthAndDayFormat) }} {% else %} {{ 'no_start_date'|_ }} {% endif %} @@ -78,7 +78,7 @@ {{ 'target_date'|_ }} {% if piggyBank.targetdate %} - {{ piggyBank.targetdate.formatLocalized(monthAndDayFormat) }} + {{ piggyBank.targetdate.isoFormat(monthAndDayFormat) }} {% else %} {{ 'no_target_date'|_ }} {% endif %} diff --git a/resources/views/popup/list/journals.twig b/resources/views/popup/list/journals.twig index 90ff182770..3ebbea0ff1 100644 --- a/resources/views/popup/list/journals.twig +++ b/resources/views/popup/list/journals.twig @@ -95,7 +95,7 @@ - {{ transaction.date.formatLocalized(monthAndDayFormat) }} + {{ transaction.date.isoFormat(monthAndDayFormat) }} {% if not hideSource %} diff --git a/resources/views/popup/report/balance-amount.twig b/resources/views/popup/report/balance-amount.twig index c0d779ae57..b27f9240c7 100644 --- a/resources/views/popup/report/balance-amount.twig +++ b/resources/views/popup/report/balance-amount.twig @@ -3,7 +3,7 @@