APISonar


org.h2.value.Value.DATE

> org > h2 > value > Value > DATE
org APIs h2 APIs value APIs Value APIs DATE APIs

Example 1
public GridH2Date(Value val) {
        assert val.getType() == Value.DATE : val.getType();

        ValueDate d = (ValueDate)val;

        date = d.getDateValue();
    }
Example 2
private void testValue(Value v) {
        testValue(v, false);
        switch (v.getValueType()) {
        case Value.DATE:
        case Value.TIME:
        case Value.TIMESTAMP:
            testValue(v, true);
        }
    }
Example 3
public static Object valueToLocalDate(Value value) {
        long dateValue = ((ValueDate) value.convertTo(Value.DATE)).getDateValue();
        if (dateValue > MAX_DATE_VALUE) {
            dateValue = MAX_DATE_VALUE;
        } else if (dateValue < MIN_DATE_VALUE) {
            dateValue = MIN_DATE_VALUE;
        }
        return LocalDate.of(DateTimeUtils.yearFromDateValue(dateValue), DateTimeUtils.monthFromDateValue(dateValue),
                DateTimeUtils.dayFromDateValue(dateValue));
    }