mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 13:36:15 +00:00
Tag and recurrence as date-time string
This commit is contained in:
@@ -89,9 +89,9 @@ class RecurrenceTransformer extends AbstractTransformer
|
||||
'type' => $shortType,
|
||||
'title' => $recurrence->title,
|
||||
'description' => $recurrence->description,
|
||||
'first_date' => $recurrence->first_date->format('Y-m-d'),
|
||||
'latest_date' => null === $recurrence->latest_date ? null : $recurrence->latest_date->format('Y-m-d'),
|
||||
'repeat_until' => null === $recurrence->repeat_until ? null : $recurrence->repeat_until->format('Y-m-d'),
|
||||
'first_date' => $recurrence->first_date->toAtomString(),
|
||||
'latest_date' => null === $recurrence->latest_date ? null : $recurrence->latest_date->toAtomString(),
|
||||
'repeat_until' => null === $recurrence->repeat_until ? null : $recurrence->repeat_until->toAtomString(),
|
||||
'apply_rules' => $recurrence->apply_rules,
|
||||
'active' => $recurrence->active,
|
||||
'nr_of_repetitions' => $reps,
|
||||
@@ -137,7 +137,7 @@ class RecurrenceTransformer extends AbstractTransformer
|
||||
$occurrences = $this->repository->getXOccurrencesSince($repetition, $fromDate, new Carbon, 5);
|
||||
/** @var Carbon $carbon */
|
||||
foreach ($occurrences as $carbon) {
|
||||
$repetitionArray['occurrences'][] = $carbon->format('Y-m-d');
|
||||
$repetitionArray['occurrences'][] = $carbon->toAtomString();
|
||||
}
|
||||
|
||||
$return[] = $repetitionArray;
|
||||
|
||||
@@ -42,7 +42,7 @@ class TagTransformer extends AbstractTransformer
|
||||
*/
|
||||
public function transform(Tag $tag): array
|
||||
{
|
||||
$date = null === $tag->date ? null : $tag->date->format('Y-m-d');
|
||||
$date = null === $tag->date ? null : $tag->date->toAtomString();
|
||||
/** @var Location $location */
|
||||
$location = $tag->locations()->first();
|
||||
$latitude = null;
|
||||
|
||||
Reference in New Issue
Block a user