def isHoliday(datetimeObj): dayOfWeek = calendar.day_name[datetimeObj.weekday()] if dayOfWeek == 'Saturday' or dayOfWeek == 'Sunday': return True dateStr = Utils.convertToDateStr(datetimeObj) holidays = getHolidays() if (dateStr in holidays): return True else: return False
def isTodayHoliday(): now = datetime.now() dayOfWeek = calendar.day_name[now.weekday()] if dayOfWeek == 'Saturday' or dayOfWeek == 'Sunday': return True todayDate = Utils.getTodayDateStr() holidays = getHolidays() if (todayDate in holidays): return True else: return False