How to check validation condition for date in Javascript.
I wanted to write Condition such that:
ReadDate |
SettlementDate |
Result |
04-10-2019 |
02-10-2019 |
Send Flow D0071 |
04-10-2019 |
04-10-2019 |
Send Flow D0071 |
04-10-2019 |
23-10-2019 |
Send flow D0010 |
if(difference between read and settlement date<5(days) or read date==settlementdate)
{
sendD0071()
}
else
{
sendD0010()
}
How to write this in javascript