In this blog, I have described, how to create a simple count down of days (business days alone) in a page with minimal use of JavaScript and HTML.
JavaScript, given below, has three parts-
- The actual timer, which is triggered every 7 milliseconds, so that you can change as per your wish.
- myTimerFn() is a function, which sets the start and end dates to get the count down of the business days in between.
- The actual function, which provides the count of business days for the given start and end dates.
Code
- <html>
-
- <head>
- <script type="text/JavaScript">
-
-
- < startDate) return 0;
-
- </script>
- </head>
- <div id="demodiv" style="border:1px solid black;background-color:yellow;height:50px;"><strong><span id="demo"></strong> </span>
- day(s) left </div>
-
- </html>
Output
Please let me know, if you have any issues implementing it.