See the European Working Time Directive for a good example of how this can be enacted.
https://en.wikipedia.org/wiki/Working_Time_Directive_2003
NB a lot of employers will ask you to sign a contract self-excluding you from its protections on your first day. ("it's not mandatory, we'd just like everyone to sign it :)" )