APISonar


org.lealone.db.value.Value.DATE

> org > lealone > db > value > Value > DATE
org APIs lealone APIs db APIs value APIs Value APIs DATE APIs

Example 1
public static Date convertDate(Value value, Calendar calendar) {
        if (value == ValueNull.INSTANCE) {
            return null;
        }
        ValueDate d = (ValueDate) value.convertTo(Value.DATE);
        Calendar cal = (Calendar) calendar.clone();
        cal.clear();
        cal.setLenient(true);
        long dateValue = d.getDateValue();
        setCalendarFields(cal, yearFromDateValue(dateValue), monthFromDateValue(dateValue), dayFromDateValue(dateValue),
                0, 0, 0, 0);
        long ms = cal.getTimeInMillis();
        return new Date(ms);
    }