title: How to add different days on one of the following countdown time function?
body: <p>the following javascript code contains 3 functions which 2 of it counts times daily and <code>CSW Timer</code> occurs once every 7 days (Sunday), however, I want to make <code>BDWTimer()</code> not everyday but only Wednesday (3) and Friday(5). I am struggling how to do that since at this moment it's only everyday for the specific hours? Any help how I can do that is appreciated ... Thanks for your time!</p>
  
  <p><strong>For example:</strong> if we are Monday -- the BDW Timer should display 2(days until Wednesday):X hours:X minutes:X seconds .. if we are Wednesday it should display 0 days and the rest and if all are done for the day (total of 4 events) to move on to the next Friday, so again: 2(days until Wednesday):X hours:X minutes:X seconds ..</p>
  
  <pre><code>&lt;script&gt;
  var currdate = new Date();
  var currdate = new Date();
  var day = currdate.getDay();
  var hrs = currdate.getHours();
  var hrs0 = currdate.getHours();
  var hrs00 = currdate.getHours();
  var mins = currdate.getMinutes();
  var secs = currdate.getSeconds();
  var CSWday = 7;
  var CSWhrs = 19;
  var FThrs1 = 6;
  var FThrs2 = 14;
  var FThrs3 = 22;
  var BDWhrs1 = 5;
  var BDWhrs2 = 11;
  var BDWhrs3 = 17;
  var BDWhrs4 = 23;
  var FTmins1 = 59;
  var FTsecs1 = 60;
  var hrsOut = 0;
  var hrsOut2 = 0;
  
  var hrs1 = FThrs1 - hrs;
  var hrs2 = FThrs2 - hrs;
  var hrs3 = FThrs3 - hrs;
  
  var hrs01 = BDWhrs1 - hrs0;
  var hrs02 = BDWhrs2 - hrs0;
  var hrs03 = BDWhrs3 - hrs0;
  var hrs04 = BDWhrs4 - hrs0;
  
  var day = CSWday - day;
  var hrs001 = CSWhrs - hrs00;
  
  if (day == 7)
      day = 0;
  
  if ((hrs &gt; 22) || ((hrs &gt;= 0) &amp;&amp; (hrs &lt; 7)))
  {
      if (hrs &gt; 22)
          hrsOut = 7;
      else
          hrsOut = hrs1;
  }
  if ((hrs &gt; 6) &amp;&amp; (hrs &lt; 15))
      hrsOut = hrs2;
  if ((hrs &gt; 14) &amp;&amp; (hrs &lt; 23))
      hrsOut = hrs3;
  
  if ((hrs0 &gt; 23) || ((hrs0 &gt;= 0) &amp;&amp; (hrs0 &lt; 6)))
  {
      if (hrs0 &gt; 23)
          hrsOut2 = 6;
      else
          hrsOut2 = hrs01;
  }
  if ((hrs0 &gt; 5) &amp;&amp; (hrs0 &lt; 12))
      hrsOut2 = hrs02;
  if ((hrs0 &gt; 11) &amp;&amp; (hrs0 &lt; 18))
      hrsOut2 = hrs03;
  if ((hrs0 &gt; 17) &amp;&amp; (hrs0 &lt;= 23))
      hrsOut2 = hrs04;
  
  mins = FTmins1 - mins;
  secs = FTsecs1 - secs;
  
  var counter=setInterval(FTTimer, 1000);
  var counter=setInterval(BDWTimer, 1000);
  var counter=setInterval(CSWTimer, 1000);
  
  function FTTimer()
  {
      secs=secs-1;
  
      if (hrsOut &lt; 0)
      {
          clearInterval(counter);
      }
      else if (mins &lt; 0)
      {
          secs = 59;
          mins = 59;
          hrsOut = hrsOut - 1;
          return;
      }
      else if (secs &lt; 0)
      {
          secs = 59;
          mins = mins - 1;
          return;
      }
  
      if (secs &lt; 10 &amp;&amp; mins &lt; 10 &amp;&amp; hrsOut &lt; 10)
          document.getElementById("FTTimer").innerHTML="0"+hrsOut+":0"+mins+":0"+secs;
      else if (mins &lt; 10 &amp;&amp; hrsOut &lt; 10)
          document.getElementById("FTTimer").innerHTML="0"+hrsOut+":0"+mins+":"+secs;
      else if (secs &lt; 10 &amp;&amp; hrsOut &lt; 10)
          document.getElementById("FTTimer").innerHTML="0"+hrsOut+":"+mins+":0"+secs;
      else if (secs &lt; 10 &amp;&amp; mins &lt; 10)
          document.getElementById("FTTimer").innerHTML=hrsOut+":0"+mins+":0"+secs;
      else if (hrsOut &lt; 10)
          document.getElementById("FTTimer").innerHTML="0"+hrsOut+":"+mins+":"+secs;
      else if (mins &lt; 10)
          document.getElementById("FTTimer").innerHTML=hrsOut+":0"+mins+":"+secs;     
      else if (secs &lt; 10)
          document.getElementById("FTTimer").innerHTML=hrsOut+":"+mins+":0"+secs;
      else
          document.getElementById("FTTimer").innerHTML=hrsOut+":"+mins+":"+secs;
  }
  
  function BDWTimer()
  {
      if (hrsOut2 &lt; 0)
      {
          clearInterval(counter);
      }
      else if (mins &lt; 0)
      {
          secs = 59;
          mins = 59;
          hrsOut2 = hrsOut2 - 1;
          return;
      }
      else if (secs &lt; 0)
      {
          secs = 59;
          mins = mins - 1;
          return;
      }
  
      if (secs &lt; 10 &amp;&amp; mins &lt; 10 &amp;&amp; hrsOut2 &lt; 10)
          document.getElementById("BDWTimer").innerHTML="0"+hrsOut2+":0"+mins+":0"+secs;
      else if (mins &lt; 10 &amp;&amp; hrsOut2 &lt; 10)
          document.getElementById("BDWTimer").innerHTML="0"+hrsOut2+":0"+mins+":"+secs;
      else if (secs &lt; 10 &amp;&amp; hrsOut2 &lt; 10)
          document.getElementById("BDWTimer").innerHTML="0"+hrsOut2+":"+mins+":0"+secs;
      else if (secs &lt; 10 &amp;&amp; mins &lt; 10)
          document.getElementById("BDWTimer").innerHTML=hrsOut2+":0"+mins+":0"+secs;
      else if (hrsOut2 &lt; 10)
          document.getElementById("BDWTimer").innerHTML="0"+hrsOut2+":"+mins+":"+secs;
      else if (mins &lt; 10)
          document.getElementById("BDWTimer").innerHTML=hrsOut2+":0"+mins+":"+secs;       
      else if (secs &lt; 10)
          document.getElementById("BDWTimer").innerHTML=hrsOut2+":"+mins+":0"+secs;
      else
          document.getElementById("BDWTimer").innerHTML=hrsOut2+":"+mins+":"+secs;
  }
  
  function CSWTimer()
  {
      if (day &lt; 0)
      {
          day = 6;
          return;
      }
      else if (hrs001 &lt; 0)
      {
          if (hrs001 == -1)
              hrs001 = 23;
          else if (hrs001 == -2)
              hrs001 = 22;
          else if (hrs001 == -3)
              hrs001 = 21;
          else if (hrs001 == -4)
              hrs001 = 20;
          day = day - 1;
          return;
      }
      else if (mins &lt; 0)
      {
          secs = 59;
          mins = 59;
          hrs001 = hrs001 - 1;
          return;
      }
      else if (secs &lt; 0)
      {
          secs = 59;
          mins = mins - 1;
          return;
      }
  
      if (secs &lt; 10 &amp;&amp; mins &lt; 10 &amp;&amp; hrs001 &lt; 10)
          document.getElementById("CSWTimer").innerHTML=day+":0"+hrs001+":0"+mins+":0"+secs;
      else if (mins &lt; 10 &amp;&amp; hrs001 &lt; 10)
          document.getElementById("CSWTimer").innerHTML=day+":0"+hrs001+":0"+mins+":"+secs;
      else if (secs &lt; 10 &amp;&amp; hrs001 &lt; 10)
          document.getElementById("CSWTimer").innerHTML=day+":0"+hrs001+":"+mins+":0"+secs;
      else if (secs &lt; 10 &amp;&amp; mins &lt; 10)
          document.getElementById("CSWTimer").innerHTML=day+":"+hrs001+":0"+mins+":0"+secs;
      else if (hrs001 &lt; 10)
          document.getElementById("CSWTimer").innerHTML=day+":0"+hrs001+":"+mins+":"+secs;
      else if (mins &lt; 10)
          document.getElementById("CSWTimer").innerHTML=day+":"+hrs001+":0"+mins+":"+secs;        
      else if (secs &lt; 10)
          document.getElementById("CSWTimer").innerHTML=day+":"+hrs001+":"+mins+":0"+secs;
      else
          document.getElementById("CSWTimer").innerHTML=day+":"+hrs001+":"+mins+":"+secs;
  }
  &lt;/script&gt;
  </code></pre>