Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

compare date javascript

// solution is convert date to time by getTime()
start 		= startDate.getTime();
end 		= endDate.getTime();
current 	= date.getTime();

if (start <= current && current <= end) {
  // do something here
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compare #date #javascript
ADD COMMENT
Topic
Name
7+4 =