I need to get a given week’s dates list when a one date of that week and the starting day is given. Starting day may be Monday, Sunday etc.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is a way that I think works, not sure it’s the most efficient way. $weekStart should be set to the day you consider the first of the week (0 = Sunday, 1 = Monday etc) and $date is the input date.