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='javas cript'>
function CheckDate(produ ctDate)
{
var dateVar = new Date(productDat e);
//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='javas cript'>
function CheckDate(produ ctDate)
{
var dateVar = new Date(productDat e);
//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.
Comment