I have to use the Java Date class for this problem (it interfaces with something out of my control).
Date
How do I get the start and end date of a year and then
Calendar cal = new GregorianCalendar(); cal.set(Calendar.DAY_OF_YEAR, 1); System.out.println(cal.getTime().toString()); cal.set(Calendar.DAY_OF_YEAR, 366); // for leap years System.out.println(cal.getTime().toString());