Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7542809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:15:59+00:00 2026-05-30T08:15:59+00:00

In the .Net-Framework there is a known bug when trying to calculate the weeknumber

  • 0

In the .Net-Framework there is a known bug when trying to calculate the weeknumber with ISO-8601.

Short-Description: “When determining the week number of a date according to the ISO 8601 standard, the underlying function call to the Oleaut32.dll file mistakenly returns week 53 instead of week 1 for the last Monday in certain years.” (Source: Microsoft)

My Question: Is this bug also ‘included’ in MonoTouch and I have to use the workaround, or is it fixed in MonoTouch? The MonoTouch-API-Reference is not a big help here…

UPDATE: As I was told in the comments I did a few tests on my own. Example-Code follows

        DateTime first = new DateTime(1851,12,29);
        DateTime second = new DateTime(2011,12,30);
        DateTime third = new DateTime(1895,12,30);

        System.Globalization.Calendar objCal = System.Globalization.CultureInfo.CurrentCulture.Calendar;
        int weekNumberFirst = objCal.GetWeekOfYear (first, System.Globalization.CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
        int weekNumberSecond = objCal.GetWeekOfYear (second, System.Globalization.CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
        int weekNumberThird = objCal.GetWeekOfYear (third, System.Globalization.CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);

        Console.WriteLine (weekNumberFirst +" "+weekNumberSecond+" "+weekNumberThird);

Supposed Output: 1 52 1
Actual Output: 53 52 53

But would still be nice, to have some “official statement” for this…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T08:16:01+00:00Added an answer on May 30, 2026 at 8:16 am

    I can confirm the bug exists in the latest MonoTouch versions.

    It’s unlikely to be fixed unless Microsoft fix their own implementation (I have not tested it on Windows) since Mono compatibility includes a number a bugs (to easy porting). However it would not be very hard to adjust your code to deal with both a working/buggy code base (so any future change won’t affect you).

    Note: This is only a semi-official statement. Official statements from any company will only come from official channels 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the .NET framework there are a couple of ways to calculate an MD5
Occasionally I will know that there is a .NET Framework function that returns a
In the .net framework, there's a generic IEnumerable<T> interface which inherits from the not-generic
Is there a class or set of functions built into the .NET Framework (3.5+)
Is there one method or property in the .NET Framework that tells if an
The .NET Framework contains since version 3.0 the ObservableCollection<T> , but why isn´t there
Is there any way to monitor all requested URLs using the .NET framework classes?
There's one specific feature that I wish was in the .NET framework, but isn't.
.NET's ProviderBase was established in the 2.0 release of the .NET Framework. Have there
guys! Is there any way to set required .Net Framework in a more universal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.