I have written my own class that extends DateTime. What I haven’t been able to figure out override the static createFromFormat() so it returns an instance of my subclass. Is this even possible? Thanks!
Joeren Offerjins gets the credit, but question is the same as mine, and has the answer I was looking for: Make DateTime::createFromFormat() return child class instead of parent
I might be missing something here – why wouldn’t this just work?