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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 11
    • Fix Version/s: None
    • Component/s: core-libs

      Description

      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


        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: