The Duke of York converted to Roman Catholicism in 1668 or 1669 , but Mary and Anne were brought up as Anglicans , pursuant to the command of Charles II .
The Duke of York became a Roman Catholic in 1668 or 1669 , but Mary and Anne had a Protestant education , as Charles II had commanded .