• Hi,

    I’m looking for a way to create a simple, text-based recurring countdown timer. I’d like for it to countdown to 8 AM every Tuesday morning.

    I’ve tried multiple WordPress plugins, but all of them are much more fancy that what I’m looking for — I don’t want circles, numbers that flip, etc. I just need plain text.

    For example:

    Next Edition: 03 days, 13 hrs, 46 mins, 28 secs

    Does anyone know how to do this? I appreciate any help!

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can do that with simple jQuery/JavaScript:

    Here is a guide:
    https://www.w3schools.com/howto/howto_js_countdown.asp

    Thread Starter Aaress

    (@aaress)

    Thanks, Shannon, for that link. I saw that link earlier, but that script seems to be for adding a specific date and it doesn’t seem to have the restart feature?

    I’m looking for something that will let me count down to a specific day of the week and then restart itself.

    You could try replacing the ‘var countDownDate’ declaration with something like this to give you next Tuesday:

    var countDownDate = new Date();
    countDownDate.setDate(countDownDate.getDate() + (2 - 1 - countDownDate.getDay() + 7) % 7 + 1); // Set date to next Tuesday (2 = 2nd day of week)
    countDownDate.setHours(8); //Set to 8am
    countDownDate.getTime(); // Convert to Time
    

    https://www.w3schools.com/code/tryit.asp?filename=FMG1VTG1JAL5

    • This reply was modified 7 years, 3 months ago by SJW.
    • This reply was modified 7 years, 3 months ago by SJW.
    Thread Starter Aaress

    (@aaress)

    I’ll try that — thanks for the help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Simple Text Recurring Countdown/Timer’ is closed to new replies.