@@ -54,7 +54,7 @@ function syncTeamVacationCalendar() {
54
54
events . forEach ( function ( event ) {
55
55
event . summary = '[' + username + '] ' + event . summary ;
56
56
event . organizer = {
57
- id : TEAM_CALENDAR_ID
57
+ id : TEAM_CALENDAR_ID ,
58
58
} ;
59
59
event . attendees = [ ] ;
60
60
Logger . log ( 'Importing: %s' , event . summary ) ;
@@ -74,26 +74,26 @@ function syncTeamVacationCalendar() {
74
74
Logger . log ( 'Execution time about to hit quota limit; execution stopped.' ) ;
75
75
}
76
76
var executionTime = ( ( new Date ( ) ) . getTime ( ) - today . getTime ( ) ) / 1000.0 ;
77
- Logger . log ( 'Total execution time (s) : ' + executionTime ) ; ;
77
+ Logger . log ( 'Total execution time (s) : ' + executionTime ) ; ;
78
78
}
79
79
80
80
/**
81
81
* In a given user's calendar, look for occurrences of the given keyword
82
82
* in events within the specified date range and return any such events
83
83
* found.
84
- * @param user the user's primary email String.
85
- * @param keyword the keyword String to look for.
86
- * @param start the starting Date of the range to examine.
87
- * @param end the ending Date of the range to examine.
88
- * @param opt_since a Date indicating the last time this script was run.
89
- * @return an array of calendar event Objects.
84
+ * @param { string } user the user's primary email String.
85
+ * @param { string } keyword the keyword String to look for.
86
+ * @param { Date } start the starting Date of the range to examine.
87
+ * @param { Date } end the ending Date of the range to examine.
88
+ * @param { Date } opt_since a Date indicating the last time this script was run.
89
+ * @return { object[] } an array of calendar event Objects.
90
90
*/
91
91
function findEvents ( user , keyword , start , end , opt_since ) {
92
92
var params = {
93
93
q : keyword ,
94
94
timeMin : formatDate ( start ) ,
95
95
timeMax : formatDate ( end ) ,
96
- showDeleted : true
96
+ showDeleted : true ,
97
97
} ;
98
98
if ( opt_since ) {
99
99
// This prevents the script from examining events that have not been
@@ -134,18 +134,19 @@ function findEvents(user, keyword, start, end, opt_since) {
134
134
135
135
/**
136
136
* Return a list of the primary emails of users in this domain.
137
- * @return array of user email Strings .
137
+ * @return { string[] } An array of user email strings .
138
138
*/
139
139
function getDomainUsers ( ) {
140
- var pageToken , page ;
140
+ var pageToken ;
141
+ var page ;
141
142
var userEmails = [ ] ;
142
143
do {
143
144
page = AdminDirectory . Users . list ( {
144
145
customer : 'my_customer' ,
145
146
orderBy : 'givenName' ,
146
147
maxResults : 100 ,
147
148
pageToken : pageToken ,
148
- viewType : 'domain_public'
149
+ viewType : 'domain_public' ,
149
150
} ) ;
150
151
var users = page . users ;
151
152
if ( users ) {
@@ -163,8 +164,8 @@ function getDomainUsers() {
163
164
/**
164
165
* Return an RFC3339 formated date String corresponding to the given
165
166
* Date object.
166
- * @param date a Date.
167
- * @return a formatted date string.
167
+ * @param { Date } date a Date.
168
+ * @return { string } a formatted date string.
168
169
*/
169
170
function formatDate ( date ) {
170
171
return Utilities . formatDate ( date , 'UTC' , 'yyyy-MM-dd\'T\'HH:mm:ssZ' ) ;
@@ -174,9 +175,9 @@ function formatDate(date) {
174
175
* Compares two Date objects and returns true if the difference
175
176
* between them is more than the maximum specified run time.
176
177
*
177
- * @param start the first Date object.
178
- * @param now the (later) Date object.
179
- * @returns true if the time difference is greater than
178
+ * @param { Date } start the first Date object.
179
+ * @param { Date } now the (later) Date object.
180
+ * @return { boolean } true if the time difference is greater than
180
181
* MAX_PROP_RUNTIME_MS (in milliseconds).
181
182
*/
182
183
function isTimeUp ( start , now ) {
0 commit comments