Wednesday, 13 October 2021

compare dates in typescript

 compare two dates 

    var date=new Date().toLocaleDateString();
var date2=new Date(this.invoiceOject.invoiceDate ).toLocaleDateString();
if(date==date2){
  this.toastr.error(
    "Unable to delete,invoiceDate is not same as Today's date",    "CASH INVOICE",     { timeOut: 4000 }
  );
  return;
}


var let main difference is let dont work inside scope only not wokr outside

{let x= hello all}
you cannot call x outside only possible with var

No comments:

Post a Comment

Meet BootUI | Scan AI-Generated Code & Find What AI Missed !

 very usefull link to verify ai content https://www.youtube.com/watch?v=pULGt0Rme58 Click