The government has backed a law that gives all workers the legal right to request a predictable working pattern.