this code will not work with DateTimeImmutable currently as this class are returning  a new instance for all modifiers. So you need to assign the return value back to ``$date`` (DateTime is returning itself for these modifier methods)