0

In windows 8.1 calendar management uses the Windows.ApplicationModel.Appointments namespace.

I am trying to understand it and it is easily managable.

I can do:
-create a calendar
-view calendars on the device
-create events

which is easy and fine;

what I want is to know how to convert from the Windows.ApplicationModel.Appointments.Appointment() object to Icalendar object. so that I can manipulate the event on different applications?

My plan was the following:

create appointmet --> serialize it to json string --> convert this json string into Icalendar json string --> send this json object to different application or web service.

I could extract the json object of the appointment on windows 8.1 which has the following structure:

{
    "RoamingId": "",
    "ReplyTime": null,
    "OnlineMeetingLink": "",
    "IsResponseRequested": true,
    "IsOrganizedByUser": false,
    "IsCanceledMeeting": false,
    "AllowNewTimeProposal": true,
    "UserResponse": 0,
    "CalendarId": "",
    "HasInvitees": false,
    "LocalId": "",
    "OriginalStartTime": null,
    "Sensitivity": 0,
    "Reminder": null,
    "Recurrence": {
        "WeekOfMonth": 0,
        "Until": null,
        "Unit": 3,
        "Occurrences": 6,
        "Month": 1,
        "Interval": 3,
        "DaysOfWeek": 32,
        "Day": 1,
        "TimeZone": "",
        "RecurrenceType": 0
    },
    "Organizer": null,
    "Location": "",
    "Duration": "00:00:00",
    "Details": "",
    "BusyStatus": 0,
    "AllDay": false,
    "StartTime": "2014-09-08T08:08:00+03:00",
    "Uri": null,
    "Subject": "this",
    "Invitees": {

    }
}

However the Icalendar structure is as follows:

BEGIN:VCALENDAR
PRODID:-//Test Productions //Test Event//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
SUMMARY:Test Event
DESCRIPTION:Description of Test Event
DTSTART:20140825T100000Z
DTEND:20140831T110000Z
RRULE:FREQ=DAILY;UNTIL=20141231T060000Z
LOCATION:Planer Earth
CLASS:PUBLIC
BEGIN:VALARM
TRIGGER:-PT1H
ACTION:EMAIL
END:VALARM
END:VEVENT
END:VCALENDAR

so they are not easily matched. !

and my question will be:

Is there a built-in functionality in the windows 8.1 API that can give me the Icalendar object directly?

If not then: is there any third party library (open source preferred) to do that for me?

if not then I have to do it myself and create my own library (right??)
I don't wish to reinvent the wheel!

stackunderflow
  • 3,811
  • 5
  • 31
  • 43

1 Answers1

0

Windows.ApplicationModel.Appointments does not speak Icalendar.

The only .net library for icalendar I'm aware of is dday ical. I don't know enough to recommend it. The forum is still alive, but the code seems not to be actively maintained and I saw acknowledged performance problems that I'm not sure have been addressed. In any case, it has no awareness of the new Windows.ApplicationModel.Appointments namespace.

I don't see the point of using Json. Icalendar is a fairly simple format, and, depending on your requirement, you should be able to code the generation of your Icalendars directly from Appointments using string methods.

bbsimonbb
  • 27,056
  • 15
  • 80
  • 110
  • Windows.ApplicationModel.Appointments DOES speak Icalendar, but on Microsoft way!! And this question is made to discover it. Any appointment event u create in your outlook(hotmail) calendar can easily sync with gmail or apple calendar, bec they all conform to icalendar standard with minor differences – stackunderflow Sep 09 '14 at 11:21
  • What objects and methods then would you use in Windows.ApplicationModel.Appointments to generate an Icalendar. I can't seem to find them. – bbsimonbb Sep 10 '14 at 07:05
  • Me neither! But why does outlook calendar accept and read ics files and exchange its events with google and aapple and yahoo and fb calendars?? It seems that you have to write your own library to convert from/to ics format to the appointmentManager format ...i am exploring things right now and trying to get expert opinions like you, and hopefully someone from msft will read this and update us – stackunderflow Sep 10 '14 at 08:24