Two maternity services in the UK have been issued with formal warnings in the past week, with one set to be closed for half a year.