ical-org/ical.net

How can I find the rest of the instances of a recurring event?

Closed this issue · 1 comments

Hello,

I am using ical.net in PowerShell to find calendar events.

# Install-Package iCal.Net -Force

# load assemblies
Write-Host loading assemblies -ForegroundColor Green
Add-Type -LiteralPath 'C:\Program Files\PackageManagement\NuGet\Packages\NodaTime.3.1.9\lib\netstandard2.0\NodaTime.dll'
Add-Type -LiteralPath 'C:\Program Files\PackageManagement\NuGet\Packages\Ical.Net.4.2.0\lib\netstandard2.0\Ical.Net.dll'

# define ics url
Write-Host defining ics url -ForegroundColor Green
$icsurl = 'https://url_to/basic.ics'

# load ics
Write-Host invoking web request -ForegroundColor Green
$response = Invoke-WebRequest $icsurl

# deserialize ICS
Write-Host deserializing ics -ForegroundColor Green
$calendar = [Ical.Net.Calendar]::Load( $response.Content )

$calendar.events

My problem is that I can only detect the first instance of a recurring event. How can I find the rest of the instances of this recurring event?

Having the same problem here. Not all of the occurances are returning by calling for Calendar.GetOccurrences method.
Sometimes it works, sometimes it doesn't...