Also see: https://wordpress.org/plugins/timed-content/
This plugin allows to show or hide content at specific times.
The original author, K. Though, stopped the development by the end of 2016. In March 2017 I have taken over the development since I use it in one website myself.
You can find the source at GitHub.