DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Coding Snack Request: Javascript countdown timer with multiple weekly targets  (Read 6,746 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
I had an idea for my favorite web comic, Head in the Clouds, created by dc members Tim and Nick (and now done by Tim).

The idea was a javascript/php countdown that shows how long until the next comic will be posted.

There are lots of countdown timers available; but i've not found one that let the author easily set multiple weekly target times.

So i was thinking some javascript that could be invoked using something like this:

in html file:
Next comic will be posted in
<script>
EmbedCountdownTimer("monday 18:00 cst; wednesday 18:00 cst");
</script>

That would produce a live timer that said something like "Next comic will be posted in 2 days, 6 hours, 10 minutes"

note: maybe it would be better to use cron format to specify the target times?

Original address: https://www.donationcoder.com/forum/index.php?topic=23020.0