topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday April 15, 2024, 11:38 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

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

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
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?