Esempio n. 1
0
def is_day_off(date, weekday):

	cal = France()
	splitted = ((date.split(" "))[0]).split("-")
	#print(splitted)
	y = int(splitted[0])
	m = int(splitted[1])
	d = int(splitted[2])

	if (cal.is_working_day(dt.date(y,m,d)) and (weekday != 6)):
		return 0
	else:
		return 1
Esempio n. 2
0
def est_ouvr(_dt) :

	# Imports
	from app.models import TDateFermeture
	from workalendar.europe import France

	output = False

	# Initialisation d'un calendrier français
	cal = France()

	# Vérification de l'ouvrabilité
	if cal.is_working_day(_dt) == True and TDateFermeture.objects.filter(pk = _dt).count() == 0 : output = True

	return output