TimerJS for realtime dynamic clock (https://github.com/ashishprajapati/TimerJS). This gem provide the way to show a dynamic clock on your html page. No bulk of code required to customized that, you can easily put your designs etc
Add this line to your application's Gemfile:
gem 'TimerJS'
And then execute:
$ bundle
Include timerjs in your manifest files:
//= require timerjs
Html to use in your html.erb file:
<span name="timerjs-H"></span>
<span name="timerjs-h"></span>
<span name="timerjs-period" data-up="AM" data-down="PM"></span>
<span name="timerjs-m"></span>
<span name="timerjs-s"></span>
<span name="timerjs-ms"></span>
Example :
<span name="timerjs-h"></span>
<span name="timerjs-period" data-up="Morning" data-down="Night"></span> :
<span name="timerjs-m"></span> :
<span name="timerjs-s"></span> :
<span name="timerjs-ms"></span>
Result :
09 Night : 34 : 56 : 245