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