Skip to content
  • Slawek Kaplonski's avatar
    Fix 'next week' button in the week's view · aba5daa9
    Slawek Kaplonski authored and Claudio Cambra's avatar Claudio Cambra committed
    When going to the next week in the week's view, it wasn't working
    at all if next week was also begining of the next month.
    It seems that it was because of the Math.floor() method used to
    calculate weekDiff - this method returns always returns integer lower or
    equal to the input argument. As calculated value was something like
    0.99, Math.floor() returned 0 so there was no change of the week at all.
    
    This patch changes it to use Math.round() which rounds input value to
    the closest integer value so it should works better in that case.
    
    Closes-issue: #186
    aba5daa9