I have this scipt where I parse ical using iCal.Net.
WebClient client = new WebClient();
client.Encoding = Encoding.UTF8;
string iCal = client.DownloadString("https://myurl");
DateTime today = DateTime.Today.ToUniversalTime();
var todayEvents = calendar.Events.Where(e => e.Start.AsUtc >= today && e.Start.AsUtc < today.AddDays).OrderByDescending(e => e.Start.AsUtc);
foreach (var evt in todayEvents)
{
console.log("Sum: " + evt.Summary + " Start: " + evt.Start + " End: " + evt.End);
}
My problem are, I only get events that starts and end the specific day (today in this example).
I do not get events like: Starts yesterday end ends tomorrow.
Any clue of how I solve that?