ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Google functions / Google Calendar
  • Properties specific to gglEvent variables
  • Managing dates and time zones
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Connexion à Google
Cnx is gglConnection
Cnx.Email = "balthazar@gmail.com"
Cnx.Password = "azerty"
Cnx.ApplicationName = "MonAppli-01"
IF GglConnect(Cnx) = False THEN
	Error(ErrorInfo())
END
...
// Récupération du tableau des agendas disponibles
tabAgendas is array of gglCalendar
tabAgendas = GglListCalendar(Cnx)
// Récupération de tous les événements du premier agenda
GglFillCalendar(Cnx, tabAgendas[1])
// Parcours des événements
Evt is gglEvent
FOR EACH Evt OF tabAgendas[1]
	Trace(Evt.Title)
	Trace(Evt.Color)
	Trace(Evt.Notification.Default)
	Trace(Evt.Notification.Override.Count)
	Trace(Evt.Visibility)
	Trace(Evt.Disponibilté)
	Trace(Evt.Attachment.Count)
	FOR EACH UneNotif OF Evt.Notification.Override
		Trace(UneNotif.Méthode)
		Trace(UneNotif.NbMinute)
	END
	FOR EACH UnFichier OF Evt.Attachment
		Trace(UnFichier.IDFichier)
		Trace(UnFichier.Titre)
		Trace(UnFichier.URLFichier)
		Trace(UnFichier.URLIcone)
		Trace(UnFichier.TypeMIME)
	END
END
Properties

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 mode.
AvailabilityString constantAvailability of the event. This property can correspond to the following constants:
  • gglOpaque: Occupied.
  • 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 event participants.
Warning: When modifying an event, participants are not automatically notified of the changes made. 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.
Note: The date is that of the local machine's time zone.
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.
  • gglPrivé: The event is private.
WholeDay
  • True if the event corresponds to entire days,
  • False otherwise.
Remarks

Managing dates and time zones

Further to the use of the "OAuth 2.0" authentication, the management of dates was modified. All dates returned by functions GglGetCalendar, GglListCalendar, ... in variables of type gglEvent use the time zone of the local machine. 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: 03/27/2025

Send a report | Local help