From 67e77e181a5429d1a29ff7dfd4b49d996a9936f9 Mon Sep 17 00:00:00 2001 From: MrHmmm <38212819+MrHmmm@users.noreply.github.com> Date: Mon, 9 Apr 2018 14:07:00 +0200 Subject: [PATCH] Clarify beginDate and endDate Was not clear what time was included and what not. Resulted in only adding an event which starts at 0:0:00 on the endDate and not the other events on that particular date. No problem, but had me puzzeling for a while :) So added some explanation to the file! --- gcalendarsync.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcalendarsync.js b/gcalendarsync.js index 196e04a..632182d 100644 --- a/gcalendarsync.js +++ b/gcalendarsync.js @@ -9,8 +9,10 @@ var calendarId = '@group.calendar.google.com'; // Set the beginning and end dates that should be synced. beginDate can be set to Date() to use // today. The numbers are year, month, date, where month is 0 for Jan through 11 for Dec. -var beginDate = new Date(1970, 0, 1); // Default to Jan 1, 1970 -var endDate = new Date(2500, 0, 1); // Default to Jan 1, 2500 +// When no time is given, it will be set at 00:00:00 +// (optional) Time can be set like new Date(1970, 0, 3, 22, 15) -> Jan 3, 1970, 22:15. +var beginDate = new Date(1970, 0, 1); // Default to Jan 1, 1970, 00:00:00 +var endDate = new Date(2500, 0, 1); // Default to Jan 1, 2500, 00:00:00 // Date format to use in the spreadsheet. var dateFormat = 'M/d/yyyy H:mm';