I'm working with time loop.
var startShow = [];
var endShow = [];
for(var i = 0; i < jsonStr[4].length; i < i++)
{
startShow[i] = moment(jsonStr[4][i].start_show).format('MM/DD/YYYY HH:mm:ss');
//ex: 01/12/2021 18:32:40,01/12/2021 17:32:40,01/12/2021 16:52:40,01/12/2021 18:10:40
endShow[i] = moment(jsonStr[4][i].end_show).format('MM/DD/YYYY HH:mm:ss');
//ex: 01/12/2021 18:53:55,01/12/2021 18:23:40,01/12/2021 19:32:40,01/12/2021 19:50:40
}
Now I have this FlipClock plugin,
var theCounters = $('.clock .value').FlipClock({
clockFace: 'TwentyFourHourClock',
callbacks:
{
interval:function()
{
var time = this.factory.getTime().time;
var currentTime = (moment(time).format('MM/DD/YYYY HH:mm:ss'));
//Here I need the currentTime check if there is a time between startShow and endShow matched.
if(matched)
{
alert("matched");
}
else
{
alert("not matched");
}
}
}
});
My question, is it possible to check if there is a currentTime between startShow and endShow match with my above code?