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

util.Date.setMonth() should recalc day of week

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.1
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.1
    • CPU:
      x86
    • OS:
      windows_nt
    • Verification:
      Not verified

      Description

      java.util.Date.setMonth() should recalc the day of the week..

      Steps to reproduce:
      Compile and run the following code

      // tests setMonth()

      import java.util.Date;

      class setMonthTest
      {
          public static void main(String args[])
          {
             Date d1 = new Date(95, 10, 21);
             System.out.println("Date " + d1);
             d1.setMonth(11);
             System.out.println("Date changed to December " + d1);

             d1.setMonth(12);
             System.out.println("Date wrapped to January " + d1);
          }
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              duke J. Duke (Inactive)
              Reporter:
              kasmithsunw Kevin Smith (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: