I am new to JavaScript, I have a very basic question.
I have this each statement within an alert in my each statement which is working perfectly:
alert( " <g:each in="${index}"> ${""+it.indexDate+""+it.value } </g:each> " );
Now I have this variable:
var todaysDate = new Date ;
I want to check if the above indexDate is same as todaysDate.
How can i exactly do this?
Thanks.
If you want to compare to the precision of miliseconds, you compare the
getTime()value of bothDateObject.If you want to compare only the Date part, you compare the
getDate()value.In Grails framework, you use the following code