Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
605
Different calenderweeknumbers in function GetWeekNumberForDate
posted

To whom it may concern,

we are having some issues with the year end/year beginning and the calendar weeks during those weeks.
In the 1st calendar week of the year 2015 (Days 29, 30, 31 of December 2014) the calendar week is numbered 53.
However in the 53st week of the year 2015 (days 1, 2, 3 of January 2016) the calendar week is numbered 53, whereas the logic would dictate this week to be numbered 1.
GetWeekNumberForDate is the function that seems to differ and vary, depending on the calendar year. Whereas the calendar control UltraDayView has the same logic display consistently.


Could you please explain your ideas behind this? We are having rather large issues with each year end/ year beginning using your software and we are open to solutions, that will be consistent for the future.

Best wishes,

A. Kasar

Parents
  • 12480
    Offline posted

    Hi Kasar,

    I used the following code, and both weeks came out to be numbered week 1:

    int wk1 = ultraCalendarInfo1.GetWeekNumberForDate(new DateTime(2015, 1, 1));
    int wk2 = ultraCalendarInfo1.GetWeekNumberForDate(new DateTime(2016, 1, 1));

    I am using Infragistics 14.2, with the October service release.

    Does your code look similar to mine? Are you nonetheless seeing different results?
    Are you using the same version and service release as me?

    Please let me know which version and SR you are using and, if possible, provide some code that I can test. My testing seems to indicate that this method is behaving consistently, so I would like to be able to take a closer look at your application.

Reply Children