Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Calendar.Calendar.GetType

Queries the type of the calendar.

Component Version macOS Windows Linux Server iOS SDK
Calendar 3.4 ✅ Yes ❌ No ❌ No ❌ No ❌ No
MBS( "Calendar.Calendar.GetType"; calendarRef )   More

Parameters

Parameter Description Example
calendarRef The id of the calendar to query. $calendarRef

Result

Returns type or error.

Description

Queries the type of the calendar.
Can be Local, CalDAV, Exchange, Birthday, Subscription or IMAP.

Examples

Check status of calendar named "Privat":

MBS( "Calendar.Calendar.GetType"; "Privat" )

Check status of calendar with ID:

MBS( "Calendar.Calendar.GetType"; "B560017B-E414-4CD9-B3D1-3D6E7717D714" )

Shows types for all calendars:

While(
[
    names = "";
    // query list of Calendar IDs
    list = MBS( "Calendar.Calendars" );
    count = ValueCount(list);
    index = 1
] ;
    index ≤ count ;
[
    id = GetValue(list; index);
    // query name for each ID
    name = MBS( "Calendar.Calendar.GetTitle"; id);
    type = MBS( "Calendar.Calendar.GetType"; id);
    names = names & name & " -> " & type & ¶;
    index = index + 1
] ;
// return all the names
names )

Example result:
Birthdays -> Birthday
Work -> Local
Holidays -> Subscription
Family -> CalDAV

See also

This function checks for a license.

Created 18th August 2014, last changed 14th June 2022


Calendar.Calendar.GetTitle - Calendar.Calendar.GetUID