@Test public void testJulTrans() { }
public CalendarDate julTrans(JulianDate jdt) { if (jdt == null) return null; CalendarDate response = null; int JGREG = 15 + 31 * (10 + 12 * 1582); int jalpha, ja, jb, jc, jd, je, year, month, day; ja = (int) jdt.getCoordinateValue().intValue(); if (ja >= JGREG) { jalpha = (int) (((ja - 1867216) - 0.25) / 36524.25); ja = ja + 1 + jalpha - jalpha / 4; } jb = ja + 1524; jc = (int) (6680.0 + ((jb - 2439870) - 122.1) / 365.25); jd = 365 * jc + jc / 4; je = (int) ((jb - jd) / 30.6001); day = jb - jd - (int) (30.6001 * je); month = je - 1; if (month > 12) { month = month - 12; } year = jc - 4715; if (month > 2) { year--; } if (year <= 0) { year--; } int[] calendarDate = {year, month, day}; response = new DefaultCalendarDate(this, null, null, calendarDate); return response; }
DefaultCalendar extends DefaultTemporalReferenceSystem implements Calendar { public CalendarDate julTrans(JulianDate jdt) { if (jdt == null) return null; CalendarDate response = null; int JGREG = 15 + 31 * (10 + 12 * 1582); int jalpha, ja, jb, jc, jd, je, year, month, day; ja = (int) jdt.getCoordinateValue().intValue(); if (ja >= JGREG) { jalpha = (int) (((ja - 1867216) - 0.25) / 36524.25); ja = ja + 1 + jalpha - jalpha / 4; } jb = ja + 1524; jc = (int) (6680.0 + ((jb - 2439870) - 122.1) / 365.25); jd = 365 * jc + jc / 4; je = (int) ((jb - jd) / 30.6001); day = jb - jd - (int) (30.6001 * je); month = je - 1; if (month > 12) { month = month - 12; } year = jc - 4715; if (month > 2) { year--; } if (year <= 0) { year--; } int[] calendarDate = {year, month, day}; response = new DefaultCalendarDate(this, null, null, calendarDate); return response; } }
DefaultCalendar extends DefaultTemporalReferenceSystem implements Calendar { public CalendarDate julTrans(JulianDate jdt) { if (jdt == null) return null; CalendarDate response = null; int JGREG = 15 + 31 * (10 + 12 * 1582); int jalpha, ja, jb, jc, jd, je, year, month, day; ja = (int) jdt.getCoordinateValue().intValue(); if (ja >= JGREG) { jalpha = (int) (((ja - 1867216) - 0.25) / 36524.25); ja = ja + 1 + jalpha - jalpha / 4; } jb = ja + 1524; jc = (int) (6680.0 + ((jb - 2439870) - 122.1) / 365.25); jd = 365 * jc + jc / 4; je = (int) ((jb - jd) / 30.6001); day = jb - jd - (int) (30.6001 * je); month = je - 1; if (month > 12) { month = month - 12; } year = jc - 4715; if (month > 2) { year--; } if (year <= 0) { year--; } int[] calendarDate = {year, month, day}; response = new DefaultCalendarDate(this, null, null, calendarDate); return response; } DefaultCalendar(ReferenceIdentifier name, Extent domainOfValidity); }
DefaultCalendar extends DefaultTemporalReferenceSystem implements Calendar { public CalendarDate julTrans(JulianDate jdt) { if (jdt == null) return null; CalendarDate response = null; int JGREG = 15 + 31 * (10 + 12 * 1582); int jalpha, ja, jb, jc, jd, je, year, month, day; ja = (int) jdt.getCoordinateValue().intValue(); if (ja >= JGREG) { jalpha = (int) (((ja - 1867216) - 0.25) / 36524.25); ja = ja + 1 + jalpha - jalpha / 4; } jb = ja + 1524; jc = (int) (6680.0 + ((jb - 2439870) - 122.1) / 365.25); jd = 365 * jc + jc / 4; je = (int) ((jb - jd) / 30.6001); day = jb - jd - (int) (30.6001 * je); month = je - 1; if (month > 12) { month = month - 12; } year = jc - 4715; if (month > 2) { year--; } if (year <= 0) { year--; } int[] calendarDate = {year, month, day}; response = new DefaultCalendarDate(this, null, null, calendarDate); return response; } DefaultCalendar(ReferenceIdentifier name, Extent domainOfValidity); JulianDate dateTrans(CalendarDate calDate, ClockTime time); JulianDate dateTrans(DateAndTime dateAndTime); CalendarDate julTrans(JulianDate jdt); Collection<CalendarEra> getBasis(); Clock getClock(); void setBasis(Collection<CalendarEra> basis); void setClock(Clock clock); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString(); }
DefaultCalendar extends DefaultTemporalReferenceSystem implements Calendar { public CalendarDate julTrans(JulianDate jdt) { if (jdt == null) return null; CalendarDate response = null; int JGREG = 15 + 31 * (10 + 12 * 1582); int jalpha, ja, jb, jc, jd, je, year, month, day; ja = (int) jdt.getCoordinateValue().intValue(); if (ja >= JGREG) { jalpha = (int) (((ja - 1867216) - 0.25) / 36524.25); ja = ja + 1 + jalpha - jalpha / 4; } jb = ja + 1524; jc = (int) (6680.0 + ((jb - 2439870) - 122.1) / 365.25); jd = 365 * jc + jc / 4; je = (int) ((jb - jd) / 30.6001); day = jb - jd - (int) (30.6001 * je); month = je - 1; if (month > 12) { month = month - 12; } year = jc - 4715; if (month > 2) { year--; } if (year <= 0) { year--; } int[] calendarDate = {year, month, day}; response = new DefaultCalendarDate(this, null, null, calendarDate); return response; } DefaultCalendar(ReferenceIdentifier name, Extent domainOfValidity); JulianDate dateTrans(CalendarDate calDate, ClockTime time); JulianDate dateTrans(DateAndTime dateAndTime); CalendarDate julTrans(JulianDate jdt); Collection<CalendarEra> getBasis(); Clock getClock(); void setBasis(Collection<CalendarEra> basis); void setClock(Clock clock); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString();  }