Override Src Core classes v8

I would like to override concrete/src/Calendar/Event/Formatter/DateFormatter.php
What’s the proper way to do this?

Because with Override (almost) any core file in Concrete CMS I can’t figure out how.

Tried several things found in docs (see below) but sometimes it’s not clear if more core files need to be overridden before another override will work.

What did you try and didn’t work?

I tried the legacy methods mentioned here:

and here:

And this one:

But no result. Sometimes it’s not clear for which cms version the code is applicable to.

But from past experiences I know it sometimes takes more than just changing/overriding 1 file.

I’m using version 8.5.7