# France's Public Holidays' Puzzle

In France, there are 11 public holidays. As a French employee who enjoys public holidays on week days, you want to know if it is possible that all of the 11 public holidays during one year fall on week days.

The puzzle is to answer this question, and more precisely, if the answer is no, to prove why and if the answer is yes, to give the next following year this will happen starting from 2019 where there are 10 bank holidays on week days.

The following rules apply to the 11 French holidays :

1. New Year's Day : 1st of January
2. Easter Monday : Monday following Easter Sunday which is the next Sunday after the first full moon beginning from Spring's Equinox (approximately 21 march).
3. Labour Day : 1st of May
4. Victory in Europe Day : 8th of May
5. Ascension Day : 39 days after Easter Sunday
6. Whit Monday : 50 days after Easter Sunday
7. Bastille Day : 14th of July
8. Assumption of Mary to Heaven : 15th of August
9. All Saints' Day : 1st of November
10. Armistice Day : 11th of November
11. Christmas Day : 25th of December

First of all,

2 and 6 always fall on a Monday, and 5 on a Thursday. So these can be ignored.

It will probably make a difference

if it's a leap year or not, but New Year's Day is the only day before the end of February.

So let's concentrate on the other ones

and check which day of year they are:
May 1st: 121 (=2 mod 7)
May 8st: 128 (=2 mod 7)
July 14th: 195 (=6 mod 7)
August 15th: 227 (=2 mod 7)
November 1st: 305 (=4 mod 7)
November 11th: 315 (=0 mod 7)
In leap years like 2020, the values will be one higher (resp. 3, 3, 0, 3, 5, 1 mod 7).

In a given year, weekends will always fall on two consecutive values mod 7 (e.g. 0 and 1). The remaining slots (1, 3 and 5 for non-leap years; 2, 4 and 6 for leap years) are non-consecutive,

so

it is not possible that all of the 11 public holidays during one year fall on week days.

• Clear and precise solution as well as first answer, congrats ! – JKHA Apr 23 at 18:02
• As a French employee which enjoys public holidays on week days, this answer saddens me. +1 for the hard truth. – Julien Lopez Apr 23 at 21:29
• @Abhilashk no, the first mentioned values (2, 2, 6, 2, 4, 0) are for 2019, a non-leap year. So the remaining slots are 1, 3 and 5. – Glorfindel Apr 24 at 6:41

It's impossible.

Consider for instance

1st of January (Day 1 of the year); 1st of May (day 121); July 14th (day 195); August 15 (day 227); 1st of November (day 305).

You get the sequence of numbers

$$1, 121, 195, 227, 305$$ which, reduced modulo $$7$$, gives $$1, 2, 6, 3, 4$$. In case of a leap year, the sequence is $$1, 122, 196, 228, 306$$ which reduces to $$1, 3, 7, 4, 5$$.

In both cases,

all days of the weeks are covered except two, but these two are not consecutive, so they can't possibly correspond to Saturday and Sunday.

• I can't choose two answers to my question and I decided to choose the first correct answer but yours is also exact and clear ;) You got my +1 – JKHA Apr 23 at 18:04

Edit: Apologies for the poor formatting, I've been trying to figure this out for forever. Any help is appreciated in hiding the code.

I can't fully, aptly answer as I don't want to steal from anyone above. My reasoning would be

"because the computer says it is simply not true".

Some very poorly written code (Python 3.x):

import datetime
from datetime import date
from datetime import timedelta

def calc_easter(year):
a = year % 19
b = year//100
c = year % 100
d = (19 * a + b - b // 4 - ((b - (b + 8) // 25 + 1) // 3) + 15) % 30
e = (32 + 2 * (b % 4) + 2 * (c // 4) - d - (c % 4)) % 7
f = d + e - 7 * ((a + 11 * d + 22 * e) // 451) + 114
month = f // 31
day = f % 31 + 1
return date(year, month, day)

completed = 0
startyear = 2019

while completed == 0 and startyear < 3000:

startyear = startyear
figureitout = 0
holidays = 0

easterdate = calc_easter(startyear)
newyears = datetime.datetime(startyear, 1,1)
easterdate = calc_easter(startyear)
easterd = easterdate + timedelta(days=1)
labourday = datetime.datetime(startyear, 5, 1)
vday = labourday + timedelta(days=7)
aday = easterdate + timedelta(days = 39)
wmon = aday + timedelta(days = 11)
bday = datetime.datetime(startyear, 7, 14)
amday = datetime.datetime(startyear, 8, 15)
asday = datetime.datetime(startyear, 11, 1)
armday = datetime.datetime(startyear, 11, 11)
cday = datetime.datetime(startyear, 12, 25)

bigdict = [newyears, easterd, labourday, vday, aday, wmon, bday, amday, asday, armday, cday]

for holiday in bigdict:

if holiday.weekday() <= 4:
figureitout = figureitout +1
holidays = holidays + 1
if figureitout >= 12 and holidays < 11:
startyear = startyear + 1
completed = 0
if figureitout > 12 and holidays == 11:
startyear = startyear + 1
completed = 0
else:
figureitout = figureitout +2
holidays = holidays + 1
if figureitout >= 12 and holidays < 11:
startyear = startyear + 1
completed = 0
if figureitout > 12 and holidays == 11:
startyear = startyear + 1
completed = 0

if figureitout == 12 and holidays == 11 or figureitout == 11 and holidays == 11:
if figureitout == 12:
holidays = 10
print("Holidays = " + str(holidays) + " in the year " + str(startyear))
startyear = startyear + 1
recurse = 1
if figureitout == 11:
holidays = 11
print("Holidays = " + str(holidays) + " in the year " + str(startyear))
startyear = startyear + 1


Explanation of the code:

The Easter calculation function is an implementation of Butcher's algorithm. The starting year, obviously, is 2019. Functions are given for each of the holidays based on either their calendar dates or respective dates to already calculated holidays. The "for holiday in bigdict" loops through the holidays and determines the weekday value they fall on - in this case, Monday is 0, Tuesday is 1, etc. That gives allowable values from 0 to 4. If the weekday returns one of these values, +1 is added to "figureitout" which starts at 0. If the value is greater than 4, +2 is added. The reason I chose this was to allow for a single holiday that doesn't fall on a weekday, like the current year specified in the question. If figureitout adds up to 11 and the number of holiday is 11, the "holidays" value is 11. If figureitout adds up to 12, the "holidays" value is 10, as 10(1) + 2 = 12. If figureitout reaches 12 prior to the number of holidays reaching 11, the values are reset and the starting year is incremented. The output is a list for all year values under 3000 that satisfy one of the two outcomes.

The resulting output:

Holidays = 10 in the year 2019 Holidays = 10 in the year 2025 Holidays = 10 in the year 2030 Holidays = 10 in the year 2031 Holidays = 10 in the year 2042 Holidays = 10 in the year 2047 Holidays = 10 in the year 2053 Holidays = 10 in the year 2058 Holidays = 10 in the year 2059 Holidays = 10 in the year 2070 Holidays = 10 in the year 2075 Holidays = 10 in the year 2081 Holidays = 10 in the year 2086 Holidays = 10 in the year 2087 Holidays = 10 in the year 2098 Holidays = 10 in the year 2104 Holidays = 10 in the year 2110 Holidays = 10 in the year 2115 Holidays = 10 in the year 2121 Holidays = 10 in the year 2126 Holidays = 10 in the year 2127 Holidays = 10 in the year 2138 Holidays = 10 in the year 2143 Holidays = 10 in the year 2149 Holidays = 10 in the year 2154 Holidays = 10 in the year 2155 Holidays = 10 in the year 2166 Holidays = 10 in the year 2171 Holidays = 10 in the year 2177 Holidays = 10 in the year 2182 Holidays = 10 in the year 2183 Holidays = 10 in the year 2194 Holidays = 10 in the year 2199 Holidays = 10 in the year 2200 Holidays = 10 in the year 2206 Holidays = 10 in the year 2211 Holidays = 10 in the year 2217 Holidays = 10 in the year 2222 Holidays = 10 in the year 2223 Holidays = 10 in the year 2234 Holidays = 10 in the year 2239 Holidays = 10 in the year 2245 Holidays = 10 in the year 2250 Holidays = 10 in the year 2251 Holidays = 10 in the year 2262 Holidays = 10 in the year 2267 Holidays = 10 in the year 2273 Holidays = 10 in the year 2278 Holidays = 10 in the year 2279 Holidays = 10 in the year 2290 Holidays = 10 in the year 2295 Holidays = 10 in the year 2301 Holidays = 10 in the year 2302 Holidays = 10 in the year 2307 Holidays = 10 in the year 2313 Holidays = 10 in the year 2318 Holidays = 10 in the year 2319 Holidays = 10 in the year 2330 Holidays = 10 in the year 2335 Holidays = 10 in the year 2341 Holidays = 10 in the year 2346 Holidays = 10 in the year 2347 Holidays = 10 in the year 2358 Holidays = 10 in the year 2363 Holidays = 10 in the year 2369 Holidays = 10 in the year 2374 Holidays = 10 in the year 2375 Holidays = 10 in the year 2386 Holidays = 10 in the year 2391 Holidays = 10 in the year 2397 Holidays = 10 in the year 2402 Holidays = 10 in the year 2403 Holidays = 10 in the year 2414 Holidays = 10 in the year 2419 Holidays = 10 in the year 2425 Holidays = 10 in the year 2430 Holidays = 10 in the year 2431 Holidays = 10 in the year 2442 Holidays = 10 in the year 2447 Holidays = 10 in the year 2453 Holidays = 10 in the year 2458 Holidays = 10 in the year 2459 Holidays = 10 in the year 2470 Holidays = 10 in the year 2475 Holidays = 10 in the year 2481 Holidays = 10 in the year 2486 Holidays = 10 in the year 2487 Holidays = 10 in the year 2498 Holidays = 10 in the year 2504 Holidays = 10 in the year 2510 Holidays = 10 in the year 2515 Holidays = 10 in the year 2521 Holidays = 10 in the year 2526 Holidays = 10 in the year 2527 Holidays = 10 in the year 2538 Holidays = 10 in the year 2543 Holidays = 10 in the year 2549 Holidays = 10 in the year 2554 Holidays = 10 in the year 2555 Holidays = 10 in the year 2566 Holidays = 10 in the year 2571 Holidays = 10 in the year 2577 Holidays = 10 in the year 2582 Holidays = 10 in the year 2583 Holidays = 10 in the year 2594 Holidays = 10 in the year 2599 Holidays = 10 in the year 2600 Holidays = 10 in the year 2606 Holidays = 10 in the year 2611 Holidays = 10 in the year 2617 Holidays = 10 in the year 2622 Holidays = 10 in the year 2623 Holidays = 10 in the year 2634 Holidays = 10 in the year 2639 Holidays = 10 in the year 2645 Holidays = 10 in the year 2650 Holidays = 10 in the year 2651 Holidays = 10 in the year 2662 Holidays = 10 in the year 2667 Holidays = 10 in the year 2673 Holidays = 10 in the year 2678 Holidays = 10 in the year 2679 Holidays = 10 in the year 2690 Holidays = 10 in the year 2695 Holidays = 10 in the year 2701 Holidays = 10 in the year 2702 Holidays = 10 in the year 2707 Holidays = 10 in the year 2713 Holidays = 10 in the year 2718 Holidays = 10 in the year 2719 Holidays = 10 in the year 2730 Holidays = 10 in the year 2735 Holidays = 10 in the year 2741 Holidays = 10 in the year 2746 Holidays = 10 in the year 2747 Holidays = 10 in the year 2758 Holidays = 10 in the year 2763 Holidays = 10 in the year 2769 Holidays = 10 in the year 2774 Holidays = 10 in the year 2775 Holidays = 10 in the year 2786 Holidays = 10 in the year 2791 Holidays = 10 in the year 2797 Holidays = 10 in the year 2802 Holidays = 10 in the year 2803 Holidays = 10 in the year 2814 Holidays = 10 in the year 2819 Holidays = 10 in the year 2825 Holidays = 10 in the year 2830 Holidays = 10 in the year 2831 Holidays = 10 in the year 2842 Holidays = 10 in the year 2847 Holidays = 10 in the year 2853 Holidays = 10 in the year 2858 Holidays = 10 in the year 2859 Holidays = 10 in the year 2870 Holidays = 10 in the year 2875 Holidays = 10 in the year 2881 Holidays = 10 in the year 2886 Holidays = 10 in the year 2887 Holidays = 10 in the year 2898 Holidays = 10 in the year 2904 Holidays = 10 in the year 2910 Holidays = 10 in the year 2915 Holidays = 10 in the year 2921 Holidays = 10 in the year 2926 Holidays = 10 in the year 2927 Holidays = 10 in the year 2938 Holidays = 10 in the year 2943 Holidays = 10 in the year 2949 Holidays = 10 in the year 2954 Holidays = 10 in the year 2955 Holidays = 10 in the year 2966 Holidays = 10 in the year 2971 Holidays = 10 in the year 2977 Holidays = 10 in the year 2982 Holidays = 10 in the year 2983 Holidays = 10 in the year 2994 Holidays = 10 in the year 2999

As we can see:

It appears impossible to have all 11 holidays land on a weekday.

• @J.Khamphousone thanks for the suggestion! I'll add it right away – visualnotsobasic Apr 23 at 18:18
• I like the idea of being helped with computers ;) if it won't happen until year 3000 it'll may never happen. And in the context of the puzzle, It'll pratically won't matter if it'll happen when the French employee won't work anymore, neither his kids, grandkids etc. ^^ I +1 you for the idea. Perhaps you should comment a bit more your code and make it a bit clearer, if you have the time and you're willling to :p – JKHA Apr 23 at 18:23
• @J.Khamphousone can do, coming right up! – visualnotsobasic Apr 23 at 18:28
• @J.Khamphousone hopefully that's clear enough and explains my thought process. – visualnotsobasic Apr 23 at 18:36