List of usage examples for java.util Calendar set
public final void set(int year, int month, int date)
YEAR
, MONTH
, and DAY_OF_MONTH
. From source file:ru.retbansk.utils.scheduled.impl.ReadEmailAndConvertToXmlSpringImplTest.java
@BeforeClass public static void beforeClass() { reader = new ReadEmailAndConvertToXmlSpringImpl(); try {/*from w w w . j a v a2 s.c o m*/ UsefulMethods.populate(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } DayReport dayReport = new DayReport(); dayReport.setPersonId(USER2); Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+3")); calendar.set(2012, Calendar.OCTOBER, 18); dayReport.setCalendar(calendar); List<TaskReport> taskList = new ArrayList<TaskReport>(); TaskReport taskReport = new TaskReport(); taskReport.setDate(calendar.getTime()); taskReport.setElapsedTime(1); taskReport.setStatus(TEST_STRING); taskReport.setWorkDescription(TEST_STRING2); taskList.add(taskReport); dayReport.setReportList(taskList); dayReportSet = new HashSet<DayReport>(); dayReportSet.add(dayReport); }