That's what parents and parents-to-be who work at the Internet company probably said after hearing news of its more generous maternity and paternity leave policy.

The company, based in Sunnyvale, Calif., will give mothers up to 16 weeks of paid maternity leave, which also applies to adoption, foster child placement, and surrogacy, and fathers will have eight paid weeks. New parents will also get a $500 cash bonus for things like child care and groceries, according to a spokeswoman for the company.

Previously, Yahoo did not provide paid paternity leave and its maternity leave varied from state to state.

In July, when CEO Marissa Mayer first began leading Yahoo, she was lauded for bringing back company perks like free meals. But she soon made headlines as a controversial leader.

Just two months ago, Mayer sparked debate when she instructed remote employees to return to company offices, just as she reportedly had a private nursery built next to her office.

Perhaps Yahoo's new maternity leave decision was influenced by her own pregnancy. After Mayer, 37, gave birth to her first child in September, she took only two weeks off of work, igniting criticism that she set unrealistic expectations for working mothers.

"Marissa Mayer probably found that intentionally or not her policies had created terrible morale. She has learned from it. And wow, she's like the parent who says, 'No you can't have ice cream, but I'm buying you a pony'," said Lesley Jane Seymour, editor-in-chief of More Magazine.

Although Yahoo was one of the first tech companies to offer parking spots reserved for pregnant women, the firm is catching up to some of its Silicon Valley competitors and their generous family leave policies.