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
def uniq(items: list): | |
''' | |
元の順序を保持したままuniqにする | |
''' | |
return sorted(set(items), key=items.index) | |
def not_none_items(items: list): | |
''' | |
Noneなアイテムを除外する | |
''' |
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
/** | |
* @return {Boolean} 祝日かどうか | |
*/ | |
function isJapaneseHoliday() { | |
var startDate = new Date(); | |
startDate.setHours(0, 0, 0, 0); | |
var endDate = new Date(); | |
endDate.setHours(23, 59, 59, 999); | |
// google calenderの提供している祝日カレンダーを取得する | |
var cal = CalendarApp.getCalendarById("ja.japanese#[email protected]"); |
OlderNewer