Families with babies in neonatal care will be entitled to additional time off in new measures confirmed by the government.