I want to display start date and end date of current week. (week start=monday, week end=sunday) I manage to display monday.
But I'm unable to get sunday date. Please post me if anyone has solution.
I want to display start date and end date of current week. (week start=monday, week end=sunday) I manage to display monday.
But I'm unable to get sunday date. Please post me if anyone has solution.
In the other examples you will have a problem when sunday falls in other month. This should solve the problem:
Based on RobG's answer, I ended up with this to get week to start on midnight Monday and end on Sunday 23:59:59.999.
You can modify the return value to meet your needs, right now it just returns the full object of Sunday.
I believe this works.
The following function will do the trick: