Closed antanova closed 5 years ago
@antanova Do you use the last version of the package?
Could you please provide some input/output examples so I can easily reproduce it and probably create a fix?
Apologies for the delay. I'm using version 1.2.3. Here's an example that reproduces my issue:
$allDay = true;
$date = new DateTime();
$date->setTimeZone(new DateTimeZone('Europe/London'));
$dateEnd = clone $date;
$dateEnd->add(new DateInterval('P1D')); // issue persists when I add 2 days or don't add anything.
use Spatie\CalendarLinks\Link;
$link = new Link( 'Example title', $date, $dateEnd, $allDay);
?>
<a href="<?php echo $link->google(); ?>">Click here</a>
If I follow the generated link, then the start date in Google is today, and the end date is yesterday.
Hey @antanova
Thanks for your great report! I've made some fixes and will be happy if you check them out, the branch is 60-fix-allday-links
I fixed this temporarily in the Google Generator by adding a day to
$link->to
like this: