Finally, men will be able to change their babies diapers in a public restroom — at least in New York — thanks to a law that went into effect on New Year's Day.

All new and renovated public buildings in New York must include changing tables in men's and women's restrooms, to ensure moms and dads have equal opportunity to care for their children.

New York Governor Andrew Cuomo announced the legislation in April, saying "all parents deserve a clean, safe space to take care of their baby’s needs."

The law applies to restaurants, stores and state facilities including parks and DMV offices, according to an April announcement.

"It's not just moms who change diapers," Democratic Senator Brad Hoylman, who worked on the new legislation, said in a statement.

In 2017, a New York City bill promoting changing tables in men's restrooms went viral on social media, as dads shared stories of laying their babies on floors and in sinks to change diapers.

Men in other states, including Florida stay-at-home dad Donte Palmer, are also calling for similar legislation. Palmer launched grassroots organization Squat for Change after a photo of him changing his son while sitting on a public toilet went viral.

More:Finally: This City Council bill might require changing tables in men's restrooms

Dads are much more involved in child care today than they were 50 years ago. In 2016, fathers reports spending about eight hours a week on child care, triple the time they provided in 1965, Pew Research Center reports.

More:Police: Serial diaper dumper left dirty diapers around New Jersey for months as 'joke'

Follow Ashley May on Twitter: @AshleyMayTweets