Format datetime value according to user settings

In a markdown card I’d like to show a date-time-value. Just using the value gives an ISO datetime, but I want it to be formatted according to the user settings. Like the entity card does.

How can I achieve this? Is there a TimstampRenderingFormat available somewhere, or some function or filter to convert the datetime value to display format?

I looked at the documentation and at some threads, but did not find a solution for this.