WELLINGTON, New Zealand — New Zealand will grant victims of domestic violence paid leave from work, in a move that activists say will give people the time to move out and seek shelter for themselves and their children without losing their jobs.

Members of Parliament approved a bill allowing the change by a vote of 63 to 57 on Wednesday night, giving domestic abuse survivors, as well as those caring for young victims, 10 days off from work in addition to their regular paid vacations.

The measure, known as the domestic violence victims’ protection bill, will take effect next April, making New Zealand the second country in the world to pass such legislation, after the Philippines.

Jan Logie, a lawmaker for the left-leaning Green Party who proposed the bill in 2016, said gender-based violence had become “entrenched” in New Zealand and “reaches into workplaces,” with victims often turning up late or missing work altogether.