Skip to content

Commit

Permalink
use proper event method (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
edalzell committed Sep 17, 2021
1 parent 9962ac9 commit 5bf0655
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Tags/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,16 @@ public function downloadLink(): string
$to = $event->end();

if ($event->isRecurring()) {
$from->setDateFrom(Carbon::parse($this->getParam('date')));
$from->setDateFrom(Carbon::parse($this->params->get('date')));
$to = $from->copy()->setTimeFromTimeString($event->endTime());
}

$title = Arr::get($this->context, 'title');
$allDay = Arr::get($this->context, 'all_day', false);
$location = Arr::get($this->context, 'location', '');

$type = $this->params->get('type');

$link = Link::create($title, $from, $to, $allDay)->address($location);
$link = Link::create($title, $from, $to, $event->isAllDay())->address($location);

return $link->$type();
}
Expand Down

0 comments on commit 5bf0655

Please sign in to comment.