Day Counter

Day Counter


This calculator is an application that works out the number of days between two dates. It comes in very handy when you are waiting for something to be released and you want to find out how many more days till they release.

To use this application use the drop down boxes to select the day, month and year. Their default value is today’s date, and on the other it is set to one month & one day ahead.

Once you have selected which dates you would like to calculate press ‘Calculate Days’ and it will instantly tell you the difference between the two dates in days.

This works by converting both of the dates into milliseconds, then misusing them from one another. Then it converts the result by dividing by 1000 and rounding that figure, it then divides by 60, to get the minutes. Then 60 again to get the number of hours, then finally by 24 to get the number of days. The formula for this is,

(((((T1(in milliseconds) - T2(in milliseconds)) / 1000) / 60) / 60) / 24)

It calculates the number of milliseconds, from 1907. It works out the number of milliseconds since that date, once it has done that it gives to big figures which we can easily take away from one another. Making a simple process to calculate the two differences from one another.

Some more examples for what this calculator could be used for:
  • Waiting for a release of a product, game or any other thing which you could be interested in
  • Waiting for Christmas and working out how many more days it is till Christmas
  • Working out how many more days till it is Christmas
  • Or working out how many more days it is to any other important event.
  • The calculator is programmed using Flash; it uses AS3 and uses the Date instance. This makes it a lot easier to calculate the differences in date and cuts the code down by a lot.

Privacy Policy