Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8237537

cal.add(Calendar.WEEK_OF_YEAR, weeksToAdd) is not working as Expected

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
       Calendar cal = Calendar.getInstance();
      cal.set(Calendar.YEAR, 2010);
      cal.set(Calendar.WEEK_OF_YEAR, 1);
      cal.add(Calendar.WEEK_OF_YEAR, -1);

      cal.get(Calendar.YEAR)) - Returned 2010 instead of 2009


      REGRESSION : Last worked in version 11


      FREQUENCY : always


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: