Skip to main content
1 of 2
Jon Taylor
  • 7.9k
  • 5
  • 31
  • 55

if you use new Date().getTime(); this will return the number of miliseconds since a particulular time (this happens to be 1st January 1970).

If you do this for both your start and end time as well as your current time, if your current time lies between start and end then it will be greater than the start miliseconds and less than the end miliseconds.

Jon Taylor
  • 7.9k
  • 5
  • 31
  • 55