Convert given integer to date.
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() {
}
[477 byte] By [
eveningsa] at [2007-11-27 1:30:10]

Isn't there an urban legend about the Mayan calendar coming to an end in 2012,and so an end to the world? Oh yes, my favourite web site: http://www.armageddononline.org/mayan_calendar.php
I am sorry for not being more specific.. basically this method returns the year from a given number. The base date is 01/01/1900. How would I go about developing another two different methods.. one that returns the day and the other that returns the month.
What I want to do is separate year, month, and day from a given number/integer. Example:
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 ;
}
If the given number was 366 then the method will return the number "1" which is 01/01/1901.