S
soni2926
Hi,
I have a function where i need to check the date passed in is within
90days of today. Could someone help me get this to work, how do i do
the 90 days compare with today?
<script language='javascript'>
function CheckDate(productDate)
{
var dateVar = new Date(productDate);
//alert(dateVar);
var today = new Date();
//alert(today);
alert( today.getDate()-dateVar.getDate() );
}
</script>
I'm subtracting the date, tried timed, but can't figure out what's it
returning.
I have a function where i need to check the date passed in is within
90days of today. Could someone help me get this to work, how do i do
the 90 days compare with today?
<script language='javascript'>
function CheckDate(productDate)
{
var dateVar = new Date(productDate);
//alert(dateVar);
var today = new Date();
//alert(today);
alert( today.getDate()-dateVar.getDate() );
}
</script>
I'm subtracting the date, tried timed, but can't figure out what's it
returning.