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

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

XMLWordPrintable

    • 1.0beta2
    • x86
    • windows_nt
    • Verified

      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);
          }
      }

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: