final DefaultCalendarDate caldate = (DefaultCalendarDate) calDate; if (caldate != null) { int[] cal = calDate.getCalendarDate(); int year = 0; int month = 0;
/** Test of getCalendarDate method, of class DefaultCalendarDate. */ @Test public void testGetCalendarDate() { int[] result = calendarDate1.getCalendarDate(); assertThat(calendarDate2.getCalendarDate(), not(equalTo(result))); }
/** Test of setCalendarDate method, of class DefaultCalendarDate. */ @Test public void testSetCalendarDate() { int[] result = calendarDate1.getCalendarDate(); int[] caldate = {1995, 5, 5}; ((DefaultCalendarDate) calendarDate1).setCalendarDate(caldate); assertThat(calendarDate1.getCalendarDate(), not(equalTo((result)))); }
calDate.getIndeterminatePosition(), calDate.getCalendarEraName(), calDate.getCalendarDate(), time.getClockTime()); return dateTrans(dateAndTime); new SimpleInternationalString("day")); if (calDate != null) { int[] cal = calDate.getCalendarDate(); int year = 0; int month = 0;
/** * Returns {@link #referenceDate} adapted for JAXB Marshalling. * * @return {@link #referenceDate} adapted for JAXB Marshalling. */ @XmlElement(name = "referenceDate", required = true) private String getReferenceDat() { final int[] dat = referenceDate.getCalendarDate(); String str = ""+dat[0]; for(int i = 1; i < dat.length; i++){ str = str + "-"; if (dat[i] < 10) str = str+"0"; str = str+dat[i]; } return str; }
/** * Convert a CalendarDate object to java.util.Date. * * @param calDate */ public static Date calendarDateToDate(final CalendarDate calDate) { if (calDate == null) { return null; } final int[] cal = calDate.getCalendarDate(); if (cal.length > 3) throw new IllegalArgumentException( "The CalendarDate integer array is malformed ! see ISO 8601 format."); return new Date((cal.length > 0 ? cal[0] : 0) * YEAR_MS + (cal.length > 1 ? cal[1] : 0) * MONTH_MS + (cal.length > 2 ? cal[2] : 0) * DAY_MS); }
final DefaultCalendarDate caldate = (DefaultCalendarDate) calDate; if (caldate != null) { int[] cal = calDate.getCalendarDate(); int year = 0; int month = 0;
final DefaultCalendarDate caldate = (DefaultCalendarDate) calDate; if (caldate != null) { int[] cal = calDate.getCalendarDate(); int year = 0; int month = 0;
/** * Test of getCalendarDate method, of class DefaultCalendarDate. */ @Test public void testGetCalendarDate() { int[] result = calendarDate1.getCalendarDate(); assertFalse(calendarDate2.getCalendarDate().equals(result)); }
/** * Test of setCalendarDate method, of class DefaultCalendarDate. */ @Test public void testSetCalendarDate() { int[] result = calendarDate1.getCalendarDate(); int[] caldate = {1995, 5, 5}; ((DefaultCalendarDate) calendarDate1).setCalendarDate(caldate); assertFalse(calendarDate1.getCalendarDate().equals(result)); }
JulianDate response; if (calDate != null && time != null) { DateAndTime dateAndTime = new DefaultDateAndTime(this, calDate.getIndeterminatePosition(), calDate.getCalendarEraName(), calDate.getCalendarDate(), time.getClockTime()); return dateTrans(dateAndTime); int[] cal = calDate.getCalendarDate(); int year = 0; int month = 0;
JulianDate response; if (calDate != null && time != null) { DateAndTime dateAndTime = new DefaultDateAndTime(this, calDate.getIndeterminatePosition(), calDate.getCalendarEraName(), calDate.getCalendarDate(), time.getClockTime()); return dateTrans(dateAndTime); null, gc.getTime(), new SimpleInternationalString("day")); if (calDate != null) { int[] cal = calDate.getCalendarDate(); int year = 0; int month = 0;
JulianDate response; if (calDate != null && time != null) { DateAndTime dateAndTime = new DefaultDateAndTime(this, calDate.getIndeterminatePosition(), calDate.getCalendarEraName(), calDate.getCalendarDate(), time.getClockTime()); return dateTrans(dateAndTime); null, gc.getTime(), new SimpleInternationalString("day")); if (calDate != null) { int[] cal = calDate.getCalendarDate(); int year = 0; int month = 0;