I want to create a function in C# which for a week number will return me the days, in that week.
For instance for week number 40, how can I get the days:
4/10, 5/10, 6/10, 7/10, 8/10, 9/10, 10/10.
Thank you in advance!
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.
I think this should do what you want:
Although I treat Sunday as first day of week, if you want Monday as first day change range from (0,7) to (1,7).
If you want to conform the ISO standard, I think this should work: