The Prostitution Reform Act 2003 of New Zealand recognized the harm done to sex workers, and that is why they decided to decriminalize. In fact, the intent of that legislation was to create a framework to safeguard the human rights of sex workers and to protect them from exploitation, to promote the welfare and occupational health and safety of sex workers.
On July 7th, 2014. See this statement in context.