mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-26 19:00:22 -06:00
Turn dates into date-times.
This commit is contained in:
parent
e221d37d2b
commit
b893651223
@ -70,8 +70,8 @@ class AvailableBudgetTransformer extends AbstractTransformer
|
||||
'currency_symbol' => $currency->symbol,
|
||||
'currency_decimal_places' => (int)$currency->decimal_places,
|
||||
'amount' => number_format((float)$availableBudget->amount, $currency->decimal_places, '.', ''),
|
||||
'start' => $availableBudget->start_date->format('Y-m-d'),
|
||||
'end' => $availableBudget->end_date->format('Y-m-d'),
|
||||
'start' => $availableBudget->start_date->toAtomString(),
|
||||
'end' => $availableBudget->end_date->endOfDay()->toAtomString(),
|
||||
'spent_in_budgets' => [],
|
||||
'spent_no_budget' => [],
|
||||
'links' => [
|
||||
|
@ -86,8 +86,8 @@ class BudgetLimitTransformer extends AbstractTransformer
|
||||
'id' => (string)$budgetLimit->id,
|
||||
'created_at' => $budgetLimit->created_at->toAtomString(),
|
||||
'updated_at' => $budgetLimit->updated_at->toAtomString(),
|
||||
'start' => $budgetLimit->start_date->format('Y-m-d'),
|
||||
'end' => $budgetLimit->end_date->format('Y-m-d'),
|
||||
'start' => $budgetLimit->start_date->toAtomString(),
|
||||
'end' => $budgetLimit->end_date->endOfDay()->toAtomString(),
|
||||
'budget_id' => (string)$budgetLimit->budget_id,
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_code' => $currencyCode,
|
||||
|
@ -90,8 +90,8 @@ class PiggyBankTransformer extends AbstractTransformer
|
||||
|
||||
// left to save:
|
||||
$leftToSave = bcsub($piggyBank->targetamount, $currentAmountStr);
|
||||
$startDate = null === $piggyBank->startdate ? null : $piggyBank->startdate->format('Y-m-d');
|
||||
$targetDate = null === $piggyBank->targetdate ? null : $piggyBank->targetdate->format('Y-m-d');
|
||||
$startDate = null === $piggyBank->startdate ? null : $piggyBank->startdate->toAtomString();
|
||||
$targetDate = null === $piggyBank->targetdate ? null : $piggyBank->targetdate->toAtomString();
|
||||
|
||||
// target and percentage:
|
||||
$targetAmount = $piggyBank->targetamount;
|
||||
|
Loading…
Reference in New Issue
Block a user