5 Replies Latest reply: Apr 18, 2007 9:06 PM by 807606 RSS

    Convert given integer to date.

    807606
      A friend of mine helped my with the first method getYear(). I need another method that will give me the day and month from a given number.

      public int getYear() {
      int year = 0 ;
      int numericDate = integerDate ;

      for ( year = 1900; numericDate > ( isLeapYear(year) ? 366 : 365 ); year++)
      numericDate -= ( isLeapYear(year) ? 366 : 365 ) ;

      return year ;
      }


      public int getMonth() {
      }

      public int getDay() {
      }