如果我指定月份,年份和年份,如何获得特定星期的天数列表weekNo作为输入. [英] How to get a list of days for particualar week if I give Month, Year & weekNo as input.

查看:55
本文介绍了如果我指定月份,年份和年份,如何获得特定星期的天数列表weekNo作为输入.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我指定月份,年份和年份,如何获得特定星期的天数列表weekNo作为输入.
例如. GetRangeofdate(整数月,整数年,整数周号)

How to get a list of days for particualar week if I give Month, Year & weekNo as input.
eg. GetRangeofdate (int month, int year, int weekno)

List<DateTime> myDates=    GetRangeofdate(1,2012,2)



结果应该是.

2012年1月8日
2012年1月9日
2012年1月10日
2012年1月11日
2012年1月12日
2012年1月13日
2012年1月14日
在此先感谢



The result should be.

08-Jan-2012
09-Jan-2012
10-Jan-2012
11-Jan-2012
12-Jan-2012
13-Jan-2012
14-Jan-2012
Thanks in advance

推荐答案

使用 DateTime [^ ]结构,它具有可以提供您所需要的属性和方法.

[edit]我的提示 [
Use the DateTime[^] structure, it has properties and methods that will provide what you need.

[edit]My tip[^] on getting the first week of the year may also help.[/edit]


这篇关于如果我指定月份,年份和年份,如何获得特定星期的天数列表weekNo作为输入.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆