Convert Unix timestamp to String in Widget

I have a list of items with text to display. All fine with oh-repeater.

The only problem I could not solve so far: Some values are in Unix time (seconds since 01-01-1970) and I would like to transfer those into some human readable form. How is this best done?

I thought about a script which is able to transform a number (unix time) into a String and return this String. But it seems that is not that easy in openhab. So how is this best done in openhab?

TIA

While I am not using this myself, shouldn’t a JavaScript (transformation) be able to easily achieve this?

If you want to do this directly in the widget, widget expressions have access to the day.js library:

So, for an item state in unix time:

dayjs.unix(items.Your_TS_Item.state)

This is wonderful! Thank you.

Unfortunately the transformations do not work in the widgets. But JustinG solved the problem (use of dayjs.unix).