I get three dates: From date, To date and current date.
I want to find whether current date is in between From and To dates. If current date is in between these two dates then I want to create two new From and To dates.
Example:
- From Date = 15 march
- To Date = 25 march
- current date = 21 march
Expected result should be:
- From Date= 15 march, To Date=21 march
- From date= 21 march, To Date=25 march
To implement this logic I want to check my current date status whether it's in middle of date range or it's before or after.