Extract the public holidays for each federal geman state ("Bundesland") - also extract the holidays ("Schulferien") for a given year.
You will have a list of the dates and you can then match which day is a holiday or when schools will be closed. You can count how many states are on holiday. If it is 16 it is a national holiday.
You might have to deal with regional special holiday like the 8th of August in Augsburg "Hohes Friedensfest" or carnival ("Rosenmontag").
--------
Also: Calculate the number of working days between any give dates. Excluding Saturdays and Sundays and also a given list of dates
--------
Also: Check how many Bundesländer's schools will be closed on any given day - for ML you could give weights by the population or use this if you have a location based task