I am using this javascript countdown clock: https://github.com/nikhiln/Circular-Countdown
I have got it working fine but now I am trying to pass in variables into its setup to allow me to control it via buttons.
It is setup via
$(".divName").ccountdown(2016,11,24, '10:40');
So Instead of that date I want to pass in variables, for example.
var date = new Date();
var EndTime = new Date(date);
EndTime.setMinutes(date.getMinutes() + 50);
var years = EndTime.getFullYear();
var months = EndTime.getMonth();
months = months + 1;
var days = EndTime.getUTCDate();
var hours = EndTime.getHours();
var minutes = ('0'+EndTime.getMinutes()).slice(-2);
var timeString = " '" + hours + ":" + minutes +"'";
$(".heatingTimer").ccountdown(years,months,days,timeString);
However this approach doesn't work. I am not sure how to pass in the variables in the format that is expeceted.