Compara datas em Javascript

<script language=”javascript”> function compareDates(date1, date2){ var int_date1 = parseInt(date1.split(“/”)[2].toString() + date1.split(“/”)[1].toString() + date1.split(“/”)[0].toString()); var int_date2 = parseInt(date2.split(“/”)[2].toString() + date2.split(“/”)[1].toString() + date2.split(“/”)[0].toString()); if (int_date1 > int_date2) { alert(“Data 1 maior que […]

Compartilhe: