Many Shopify stores would like to have different messaging for different times of the days. The most common scenario is a message for the customer to call the store when the store is open and to email when the store is closed. Here are the instructions on how to do that in Shopify with Liquid and JS.
You've seen that useful promo on other store's that tells the customer to call when the store is open. Here's an example of the promo:
And then when the store is closed, the messaging is changed to something like this:
Well, here's the liquid code to make that happen. This view is from within the Shopify theme editor, which does a good job of color coding elements so its easier to read. Notes are included to help you understand how it works.
Hope this helps!