While working with Noda Time I am trying to base some data on the WeekOfWeekYear
,
What I have noticed is that the WeekOfWeekYear
property changes on a Monday yet I need it to start on Sunday (using the ISO calendar). Is this possible?
No, ISO-8601 explicitly specifies that calendar weeks start on Monday - and "week of week year" is basically following ISO-8601.
If you want a different week and day numbering scheme, you'll currently have to create your own. (It may well not be terribly difficult, depending on what you need, but you'll need to do it yourself at the moment.) You should work out exactly what your requirements are in terms of how the first week of the year is determined though. For example, .NET provides a few options, none of which quite matches ISO-8601.
I'm just starting work on Noda Time 2.0 at the moment - if you think a more flexible date/week-year mapping API would be useful, please file a feature request and I'll see what I can do.
See more on this question at Stackoverflow