Openhab: How to show only the day from a "date-String"

I found this to learn to create own widgets.
Probablyi have to create a template-widget with the script