Shop closed script help

Not really a concrete5 specific question…
I am trying to create a line of text which shows if the shop is open or closed based on time and day. I have tried several js solutions but none of them seem to work. Anyone care to share what works?
thanks