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

util.Date.setDay() does not recalc date. Suggest removing util.Date.setDay()

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.0beta2
    • CPU:
      x86
    • OS:
      windows_nt
    • Verification:
      Verified

      Description

      java.util.Date.setDay() does not recalc date. See SuggestedFix

      Steps to reproduce
      Compile and run the following code

      /* setDay tests */

      import java.util.Date;

      class setDayTest
      {
          public static void main(String s[])
          {
             Date d1 = new Date(95, 10, 20);

             System.out.println("Date: " + d1);
             
             d1.setDay(5);
             System.out.println("setDay(5), Fri Nov 24 1995: " + d1);
          }
      }

        Attachments

          Activity

            People

            Assignee:
            jag James Gosling (Inactive)
            Reporter:
            kasmithsunw Kevin Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: