MZOutlookAppointmentTools.iCalendarTools 0.9.2

dotnet add package MZOutlookAppointmentTools.iCalendarTools --version 0.9.2                
NuGet\Install-Package MZOutlookAppointmentTools.iCalendarTools -Version 0.9.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MZOutlookAppointmentTools.iCalendarTools" Version="0.9.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MZOutlookAppointmentTools.iCalendarTools --version 0.9.2                
#r "nuget: MZOutlookAppointmentTools.iCalendarTools, 0.9.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MZOutlookAppointmentTools.iCalendarTools as a Cake Addin
#addin nuget:?package=MZOutlookAppointmentTools.iCalendarTools&version=0.9.2

// Install MZOutlookAppointmentTools.iCalendarTools as a Cake Tool
#tool nuget:?package=MZOutlookAppointmentTools.iCalendarTools&version=0.9.2                

MZOutlookAppointmentTools

This library simplifies the creation of recurring Outlook AppointmentItems using standard iCalendar recurrence patterns. It also enables the retrieval of recurrence pattern strings from existing Outlook recurring AppointmentItems. Currently the library provides some tools to parse,generate and compare iCalendar recurrence rules for Outlook appointment items

Limitations

  1. The library currently just supports these recurrence types: "DAILY" / "WEEKLY" / "MONTHLY" / "YEARLY". This is because these are the only supported types by Outlook. As a consequence all the related keywords (e.g. "BYHOUR","BYMINUTE","BYSECOND") are not supported.
  2. The "WKST" is not supported as it seems that there are no way to handle it in Outlook.
  3. Patterns containing "BYWEEKNO" are not supported.

Supported Pattern Samples

  • "FREQ=WEEKLY;BYDAY=SA"
  • "FREQ=WEEKLY;BYDAY=MO,TU,WE"
  • "FREQ=WEEKLY;BYDAY=MO,TU,WE;INTERVAL=2"
  • "FREQ=MONTHLY;BYMONTHDAY=12"
  • "FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=1"
  • "FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1"
  • "FREQ=YEARLY;BYMONTHDAY=7;BYMONTH=3"
  • "FREQ=YEARLY;BYDAY=FR;BYMONTH=11;BYSETPOS=2"
  • "FREQ=YEARLY;BYDAY=FR;BYMONTH=11;BYSETPOS=3;INTERVAL=3"
  • "FREQ=YEARLY;BYDAY=MO,TU,WE,TH,FR;BYMONTH=9;BYSETPOS=1"

Usage:

SetRecurrencePattern:

 AppointmentItem aItem = (AppointmentItem)ApplicationInstance.CreateItem(OlItemType.olAppointmentItem);
 string pattern = "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR";
 RecurrenceStringTools.SetRecurrencePattern(pattern, aItem, itemStart);
 var recPattern = aItem.GetRecurrencePattern();
//Expected values:
//  recPattern.RecurrenceType == OlRecurrenceType.olRecursWeekly
//  recPattern.DayOfWeekMask == OlDaysOfWeek.olMonday | OlDaysOfWeek.olTuesday | OlDaysOfWeek.olWednesday | OlDaysOfWeek.olThursday | OlDaysOfWeek.olFriday
//  recPattern.Instance == 0
//  recPattern.Interval == 1

GetRecurrencePattern

 AppointmentItem aItem = (AppointmentItem)ApplicationInstance.CreateItem(OlItemType.olAppointmentItem);
 var occ = aItem.GetRecurrencePattern();
 occ.RecurrenceType = OlRecurrenceType.olRecursDaily;
 occ.Interval = 1;
 aItem.Save();
 var item = RecurrenceStringTools.GetRecurrenceString(aItem); // "FREQ=DAILY;INTERVAL=1"

AreEqual

  string pattern1 = "FREQ=WEEKLY;BYDAY=MO,TU,WE";
  string pattern2 = "FREQ=WEEKLY;BYDAY=TU,WE,MO";
  var areEqual = RecurrenceStringTools.AreEqual(pattern1, pattern2);// true

More samples could be found in the test project.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.9.2 75 11/26/2024
0.9.1 79 11/20/2024
0.9.0 74 11/20/2024
0.8.12 77 11/18/2024
0.8.11 73 11/14/2024
0.8.1 70 11/14/2024
0.8.0 71 11/14/2024