Ruby 查找当前发生的定期Outlook事件

Ruby 查找当前发生的定期Outlook事件,ruby,outlook,ole,Ruby,Outlook,Ole,我有一个使用Win32OLE的Ruby脚本来读取我的Outlook事件并查找今天发生的事件(基于开始日期值) events_today='' calendar.Items.each do|约会| appt_date=Time.parse(appointment.Start) 如果应用日期>今天和应用日期

我有一个使用Win32OLE的Ruby脚本来读取我的Outlook事件并查找今天发生的事件(基于开始日期值)

events_today=''
calendar.Items.each do|约会|
appt_date=Time.parse(appointment.Start)
如果应用日期>今天和应用日期<明天

今天的活动使用Items.includeCurrences属性:

这正是我需要的,谢谢!(请注意,对于尝试此操作的其他人,请确保在调用
includeCurrences
之前执行
排序(“[Start]”)
。这让我有些困惑。
events_today = ''

calendar.Items.each do |appointment|
    appt_date = Time.parse(appointment.Start)
    if appt_date > today && appt_date < tomorrow
        events_today << "<p><strong>#{appointment.Subject}:</strong> #{appt_date.strftime("%I:%M %p")}</p>"
    end
end