<p>
The input {@link Date} is converted into a {@link DateTime} with the given
{@link Chronology}
</p>

@param chronology {@link Chronology} to be used
@return the {@link DateTime} created from the input and arguments
774460
public static final <T extends Date> Function<T, DateTime> dateToDateTime(Chronology chronology) {
		return FnDateTime.dateToDateTime(chronology);
	}
565994
public static final <T extends Date> Function<T, MutableDateTime> dateToMutableDateTime(Chronology chronology) {
        return FnMutableDateTime.dateToMutableDateTime(chronology);
    }
561211
public final void setDate(final Date date) {
		this.date = (Date) date.clone();
		dateStr = ArchiveUtils.get14DigitDate(date);
	}
316287
public static final <T extends Date> Function<T, DateMidnight> dateToDateMidnight(Chronology chronology) {
		return new DateToDateMidnight<T>(chronology);
	}
77299
protected static DateWriter date(Date date) {
		return date((date == null) ? null : new ICalDate(date));
	}
896500
public static java.util.Date newDateTime() {
        return new java.util.Date((System.currentTimeMillis() / SECOND_MILLIS) * SECOND_MILLIS);
    }
348784
private ChronoPeriodImpl validateAmount(TemporalAmount amount) {
        Objects.requireNonNull(amount, "amount");
        if (amount instanceof ChronoPeriodImpl == false) {
            throw new DateTimeException("Unable to obtain ChronoPeriod from TemporalAmount: " + amount.getClass());
        }
        ChronoPeriodImpl period = (ChronoPeriodImpl) amount;
        if (chrono.equals(period.getChronology()) == false) {
            throw new ClassCastException("Chronology mismatch, expected: " + chrono.getId() + ", actual: " + period.getChronology().getId());
        }
        return period;
    }
304355
private void validateChrono(TemporalAccessor temporal) {
        Objects.requireNonNull(temporal, "temporal");
        Chronology temporalChrono = temporal.query(TemporalQueries.chronology());
        if (temporalChrono != null && IsoChronology.INSTANCE.equals(temporalChrono) == false) {
            throw new DateTimeException("Chronology mismatch, expected: ISO, actual: " + temporalChrono.getId());
        }
    }
1055556
public static DateTime date(Date date) {
		if (date instanceof DateTime) {
			return (DateTime) date;
		}
		return dateNew(date);
	}
859291
public Date add(Date date) {
		Calendar c = Calendar.getInstance();
		c.setTime(date);

		if (weeks != null) {
			int weeks = this.weeks * (prior ? -1 : 1);
			c.add(Calendar.DATE, weeks * 7);
		}
		if (days != null) {
			int days = this.days * (prior ? -1 : 1);
			c.add(Calendar.DATE, days);
		}
		if (hours != null) {
			int hours = this.hours * (prior ? -1 : 1);
			c.add(Calendar.HOUR_OF_DAY, hours);
		}
		if (minutes != null) {
			int minutes = this.minutes * (prior ? -1 : 1);
			c.add(Calendar.MINUTE, minutes);
		}
		if (seconds != null) {
			int seconds = this.seconds * (prior ? -1 : 1);
			c.add(Calendar.SECOND, seconds);
		}

		return c.getTime();
	}
1000733
public static Calendar createCalendar(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        return cal;
    }
623121
public Observance getObservance(Date date) {
		Boundary boundary = getObservanceBoundary(date);
		return (boundary == null) ? null : boundary.getObservanceIn();
	}
129867
@Override
    public long toEpochDay() {
        long year = prolepticYear;
        long accountingEpochDay = ((year - 1) * WEEKS_IN_YEAR + chronology.previousLeapYears(year)) * DAYS_IN_WEEK + (getDayOfYear() - 1);
        return accountingEpochDay - chronology.getDays0001ToIso1970();
    }
892578
public static final <T extends Calendar> Function<T, DateTime> calendarToDateTime(Chronology chronology) {
		return FnDateTime.calendarToDateTime(chronology);
	}
3293
@Override
    public ChronoLocalDateTime<D> with(TemporalAdjuster adjuster) {
        return toLocalDate().getChronology().ensureChronoLocalDateTime(super.with(adjuster));
    }
35507
@Override
    @SuppressWarnings("unchecked")
    public ChronoLocalDateTime<JulianDate> localDateTime(TemporalAccessor temporal) {
        return (ChronoLocalDateTime<JulianDate>) super.localDateTime(temporal);
    }
930975
@Override
    @SuppressWarnings("unchecked")
    public ChronoZonedDateTime<JulianDate> zonedDateTime(TemporalAccessor temporal) {
        return (ChronoZonedDateTime<JulianDate>) super.zonedDateTime(temporal);
    }