This is a practical solution for me to quickly insert the current date in a standardised format in a hugo blog post for example.

Beside the termux you need the termux widget app.

Open termux and and go to the shortcuts directory

cd .shortcuts

If it not already exists, make a new folder

mkdir tasks

Go in that folder

cd tasks

Make a new file

nano date-to-clipboard

And copy following in

date -Is | tr -d "\n" | termux-clipboard-set

Save and exit and eventually check if executable

The shortcut is now available in termux widget