![]() |
|||
|
About Article
Alternative to Week numbers according to ISO8601
The code snippet below returns the first Thursday of a given year without iterating anything.DateTime FirstThursday(int year) { DateTime dt=new DateTime(year, 1, 1); return dt.AddDays((11-(int)dt.DayOfWeek)%7);}The formula used may seem a bit bizarre, it computes the distance...
Top News
The Next Version of Android - Some of What's Coming Get the Insider News free each morning.Related Videos
Related Articles
|
||||||||||||||