How can we fetch starting date and ending date based on current date
Have explained with Example
Example 1 and 2 are similar case.
But if at time we have scenario 3) Then the format for extraction of the date will get changed as explained
Example 1): If today is 20th Nov
Then fetch starting date as :6|11|2023(Monday)
Ending Date : 12|11|2023(Sunday)
Example 2): If today is 27th Nov
Then fetch starting date as :13|11|2023(Monday)
Ending Date : 19|11|2023(Sunday)
3)But if Today’s date is 13th Nov
Then fetch starting date as :1|11|2023(Cannot take monday in this case because its then October in this case.Therefore first day of Month)
Ending Date : 5|11|2023