Created
December 9, 2015 08:25
-
-
Save kakakaya/3ef4e690af05695d12cf to your computer and use it in GitHub Desktop.
怪文書
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
// -*- mode:js2; coding:utf-8 -*- | |
// Created: Wed Dec 9 17:00:55 2015 | |
function isXmasBusy() { | |
var calendars = CalendarApp.getAllOwnedCalendars(); | |
var xmas_eve = new Date(2015, 11,24); | |
var xmas = new Date(2015, 11, 25); | |
for (i=0,len=calendars.length;i!=len;i++) { | |
var calendar = calendars[i]; | |
if (calendar.getEventsForDay(xmas_eve).length != 0 || | |
calendar.getEventsForDay(xmas).length != 0) { | |
return true; | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment