All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.duckdb.DuckDBDate Maven / Gradle / Ivy

The newest version!
package org.duckdb;

import java.sql.Date;
import java.time.LocalDate;
import java.time.temporal.ChronoUnit;

public class DuckDBDate {
    private final long daysSinceEpoch;

    public DuckDBDate(Date date) {
        this.daysSinceEpoch = LocalDate.ofEpochDay(0).until(date.toLocalDate(), ChronoUnit.DAYS);
    }

    public long getDaysSinceEpoch() {
        return daysSinceEpoch;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy