ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / Google functions / Google Calendar
  • Properties specific to gglEvent variables
  • Managing dates and time zones
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The gglEvent type is used to describe and modify an event of a calendar. The calendar is described via the gglCalendar type. This calendar is used by the Google Calendar service.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Connect to Google
Cnt is gglConnection
Cnt.Email = "balthazar@gmail.com"
Cnt.Password = "qwerty"
Cnt.ApplicationName = "MyApp-01"
IF GglConnect(Cnt) = False THEN
Error(ErrorInfo())
END
...
// Retrieve the array of available calendars
arrCalendars is array of gglCalendar
arrCalendars = GglListCalendar(Cnt)
// Retrieve all the events of the first calendar
GglFillCalendar(Cnt, arrCalendars[1])
// Browse the events
Evt is gglEvent
FOR EACH Evt OF arrCalendars[1]
Trace(Evt.Title)
Trace(Evt.Color)
Trace(Evt.Notification.Default)
Trace(Evt.Notification.Override.Count)
Trace(Evt.Visibility)
Trace(Evt.Availability)
Trace(Evt.Attachment.Count)
FOR EACH ANotif OF Evt.Notification.Override
Trace(ANotif.Method)
Trace(ANotif.NbMinute)
END
FOR EACH AFile OF Evt.Attachment
Trace(AFile.FileID)
Trace(AFile.Title)
Trace(AFile.FileURL)
Trace(AFile.IconURL)
Trace(AFile.MIMEType)
END
END
Remarks

Properties specific to gglEvent variables

The following properties can be used to handle a calendar event via the gglEvent type:
Property nameType usedEffect
AttachmentgglAttachment variableAttachments of the event.
AuthorgglAuthorAuthor of the calendar. This property is accessible in read-only.
AvailabilityString constantAvailability of the event. This property can correspond to the following constants:
  • gglOpaque: Busy.
  • gglTransparent: Available.
ColorUnicode stringEvent color identifier. The following colors are available:
ContentUnicode stringDescription of the event.
EndDateDateTimeEnd date of the event.
Remarks:
  • For all-day events, the end date is the date of the next day at 12:00 AM.
  • The date is expressed in the time zone of the local computer.
Guest[n]Array of gglPersonList of participants to the event.
Caution: When modifying an event, the participants are not automatically informed of the modifications performed. This feature must be programmed if necessary.
IdentifierUnicode stringGoogle identifier of the event.
LocationList of locations associated with the event.
NotificationgglNotification variableNotifications related to the event.
StartDateDateTimeStart date of the event.
Remarks:
  • For all-day events, the start date is the same day at 12:00 AM.
  • The date is expressed in the time zone of the local computer.
TitleUnicode stringTitle of the event.
UpdateDateDateTimeDate the event is updated. This property is accessible in read-only mode.
Remark: The date is expressed in the time zone of the local computer.
VisibilityString constantVisibility of the event. This property can correspond to the following constants:
  • gglConfidential: The event is confidential.
  • gglDefault: Default visibility.
  • gglPublic: The event is visible to all users with access to the calendar.
  • gglPrivate: The event is private.
WholeDay
  • True if the event corresponds to entire days,
  • False otherwise.

Managing dates and time zones

Further to the use of the "OAuth 2.0" authentication, the management of dates was modified. All the dates returned by GglGetCalendar, GglListCalendar, ... in the gglEvent variables are using the time zone of the local computer. Therefore, they can be directly used in a Calendar control with the current time zone.
To convert them into a specific time zone, you can use DateTimeLocalToTimeZone or DateTimeLocalToUTC.
You can retrieve the time zone of the calendar accessed via the TimeZone property of gglCalendar variables. The returned value corresponds to the name of the time zone, issued from the "tz" database (or Olson database). This name can be directly used by DateTimeLocalToTimeZone.
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help