ISO 8601 compliant week and week date C# implementation.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
WeekDates.Tests
WeekDates
.gitignore
README.md
WeekDates.sln

README.md

The .NET Framework doesn't correctly determine the ISO 8601 compliant number of a week within a year, as outlined in http://support.microsoft.com/kb/200299. This is a problem when working within the EU especially, as most countries here use ISO 8601 week numbers.

Although there are a lot of code samples to be found on e.g. Stack Overflow solving the problem, I found most of them to involve too many magic numbers to be acceptable for production code.

The following functionality is inspired by the concept of week dates and is comprised of a Week and a WeekDate class.