Click here to Skip to main content
12,401,158 members (31,832 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

6.7K views
2 bookmarked
Posted

Week numbers according to ISO8601

, 30 Jul 2010 CPOL
/// /// Stuct for the ISO 8601 week date/// /// /// See:/// See:/// Algorithm:<see...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

7 Mar 2010
Luc Pattyn
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...
8 Mar 2010
Richard MacCutchan
2 alternatives  
A question arose recently in the C# forum about computing a date or day of the week based on a particular week number in the year.The problem appeared quite simple at first, just add (number of weeks * 7) to 1st January and adjust as necessary. However, as a number of posters pointed out, the...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

jasper.mandos
Germany Germany
No Biography provided

| | Privacy | Terms of Use | Mobile
Web02 | 2.8.160721.1 | Last Updated 30 Jul 2010
Article Copyright 2010 by jasper.mandos
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid