Created
February 5, 2024 15:31
-
-
Save andersondias/7d20adc84b3cef0ae748a521f89e5105 to your computer and use it in GitHub Desktop.
Addition to Google's Vacation calendar template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this to the shouldImportEvent method. | |
// Filters out events that are less than 4 hours long. | |
const millisecondsIn4Hours = 4 * 60 * 60 * 1000; | |
if (new Date(event.end.dateTime) - new Date(event.start.dateTime) < millisecondsIn4Hours) { | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment