Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if it has passed midnight

//A simple solution to check whether two dates represent the same day is:
const isSameDay = (a, b) => return a.toDateString() === b.toDateString();
// This works no matter what the distance between the two dates is.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #check #passed #midnight
ADD COMMENT
Topic
Name
8+9 =