PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Managing dates and times
  • Possible error cases:
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
GglFillCalendar (Function)
In French: GglRemplitAgenda
Fills a calendar that was retrieved beforehand: the events corresponding to the calendar are retrieved (some criteria may be specified). This function must be used after the call to GglListCalendar.
Caution: the access to the Google Calendars changes from November 17, 2014
From November 17 2014, Google is only using the Google API version 3 (Google API version 2 is abandoned). This change of version has modified the exchange format of data used by the functions for accessing the Google Calendars.
An "OAuth 2.0" authentication is now required to access this service. This authentication mode requires:
  • the declaration of the application in the Google console. To use the Google Calendars, the application must use the "Calendar API" service.
  • the use of new properties in the gglConnection variable.
See the help about GglConnect for more details.
Caution: The gglCalendar, gglEvent and gglLocation variables are also modified. Some properties become obsolete with the Google API version 3: they must not be specified anymore.
Example
// Connection
Cnt is gglConnection
...
IF GglConnect(Cnt) = False THEN
Error(ErrorInfo())
RETURN
END
arrCalendars is array of 0 gglCalendar
arrCalendars = GglListCalendar(Cnt)
// First calendar
Calendar is gglCalendar = arrCalendars[1]
// Example of different calls to GglFillCalendar
// Retrieves all the future events:
GglFillCalendar(Cnt, Calendar)
// Retrieve all the forthcoming events containing "PC Soft"
GglFillCalendar(Cnt, Calendar, "", "", "PC Soft")
// Retrieve all the forthcoming events that do not contain "work"
GglFillCalendar(Cnt, Calendar, "", "", "-work")
// Retrieves all the future events
GglFillCalendar(Cnt, Calendar, TimeSys())
// Retrieves all the passed events
GglFillCalendar(Cnt, Calendar, "", TimeSys())
// Retrieves the events between 01/01/2008 and 01/01/2009 included
GglFillCalendar(Cnt, Calendar, "20080101", "20090102")
// Other possibility:
GglFillCalendar(Cnt, Calendar, "20080101", "20090101235959")
// Retrieves the events between 11/01/2008 and 12/01/2008 excluded
GglFillCalendar(Cnt, Calendar, "20081101", "20081201")
// Browse the events of a calendar
Evt is gglEvent
FOR EACH Evt OF Calendar
Trace(Evt..Title)
END
Syntax
<Result> = GglFillCalendar(<Google Connection> , <Calendar> [, <Beginning of Events> [, <End of Events> [, <String to Find>]]])
<Result>: Boolean
  • True if the events have been retrieved,
  • False otherwise. To find out the error details, use ErrorInfo.
<Google Connection>: gglConnection variable
Name of gglConnection variable to use. This connection was validated by GglConnect.
Versions 20 and later
Caution: the properties of the gglConnection variable must be revised for the OAuth 2.0 authentication.
New in version 20
Caution: the properties of the gglConnection variable must be revised for the OAuth 2.0 authentication.
Caution: the properties of the gglConnection variable must be revised for the OAuth 2.0 authentication.
<Calendar>: gglCalendar variable
Name of gglCalendar variable to fill.
<Beginning of Events>: Optional DateTime
Start date and time of events to retrieve.
If <Beginning of Events> and <End of Events> are not specified, only the future events are retrieved (events from today's date).
If only <Beginning of Events> is specified, all the events found after this date will be retrieved (the limit date defined by Google is 01/01/2031).
<End of Events>: Optional DateTime
End date and time of events to retrieve.
If <Beginning of Events> and <End of Events> are not specified, only the future events are retrieved (events from today's date).
If only <End of Events> is specified (in this case, <Beginning of Events> is equal to an empty string), all the events found before this date are retrieved (the limit date defined by Google is 01/01/1970).
<String to Find>: Optional character string
Text to find in the calendar events.
If this parameter is specified, only the events containing the specified text will be listed. The search is performed on the name and on the description of the calendar. This search is not case sensitive.
This parameter corresponds to an empty string ("") by default.
Remarks

Managing dates and times

  • The dates are automatically converted to the UTC format.
  • If only the date is specified (without specifying the hours, minutes and seconds):
    • in <Beginning of Events>, all the events found from the specified date at 0 hour 0 minute 0 second will be taken into account.
    • in <End of Events>, all the events found until the specified date at 0 hour 0 minute 0 second will be taken into account (therefore, the events of the day will not be taken into account).
  • Don't forget to configure the time zone and the time of the computer that performs the search.

Possible error cases:

  • The Internet connection is not valid.
  • The authentication was not performed properly.
  • The XML response of the server cannot be read.
  • The calendar was not found.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230ggl.dll
Windows Mobile wp230ggl.dll
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment