Ah yes you were correct, I had some more code in there so I have now combined the two.
Also, apologies as I was mistaken about the setting to remove the date.
I had misremembered and thought there were separate options to show Date Published and Date Modified, but there is only a single option to control the date being shown.
My concern with hiding things via CSS is that it can look deceptive from an SEO point of view. I don’t think that is an issue here, but I prefer to just remove it if it is not being used.