else julianDay -= 2;
  private long getLinearDay(int year, int dayOfYear, boolean gregorian)  {		// The 13 is the number of days, that were omitted in the Gregorian		// Calender until the epoch.		// We shift right by 2 instead of dividing by 4, to get correct		// results for negative years (and this is even more efficient).    long julianDay = ((year * (365L * 4 + 1)) >> 2) + dayOfYear                     - ((1970 * (365 * 4 + 1)) / 4 + 1 - 13);    if (gregorian)      {			// subtract the days that are missing in gregorian calendar			// with respect to julian calendar.			//			// Okay, here we rely on the fact that the gregorian			// calendar was introduced in the AD era.  This doesn't work			// with negative years.			//			// The additional leap year factor accounts for the fact that			// a leap day is not seen on Jan 1 of the leap year.			int gregOffset = (year / 400) - (year / 100) + 2;	if (isLeapYear(year, true) && dayOfYear < 31 + 29)				--gregOffset;			julianDay += gregOffset;		}		return julianDay;	}