Merry Christmas & Happy New Year to you!
This tutorial will explain how you can count down to a day or an event of your choice.
Download Date plugin
rex_rainbow date plugin (http://c2rexplugins.weebly.com/)
Logic : the rex_rainbow date plugin will provide you the Unix style time in millisecond that can be exploited to to make a countdown time for a particular day or event as explained below.
@Convert number of seconds into hours, minutes and seconds and return an array containing those values to create count down timer.
timeStamp = Number of seconds to parse // this is fteched from dae plugin
secondsInAMinute = 60
secondsInAnHour = 60 * secondsInAMinute
secondsInADay = 24 * secondsInAnHour
// extract days
days = floor(inputSeconds / secondsInADay)
// extract hours
hourSeconds = inputSeconds % secondsInADay
hours = floor(hourSeconds / secondsInAnHour)
// extract minutes
minuteSeconds = hourSeconds % secondsInAnHour
minutes = floor(minuteSeconds / secondsInAMinute)
// extract the remaining seconds
remainingSeconds = minuteSeconds % secondsInAMinute
seconds = ceil(remainingSeconds)
declare following variables for conversion.
write a function to convert the fetched seconds into days, hours, minutes and seconds.
call this function every second for real time update.
That it, hope might be useful in some way.
Demo and CAPX here.