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

com.javaoffers.brief.modelhelper.convert.Number2LocalDateTimeConvert Maven / Gradle / Ivy

There is a newer version: 3.6.8
Show newest version
package com.javaoffers.brief.modelhelper.convert;

import java.time.LocalDateTime;
import java.util.Date;

public class Number2LocalDateTimeConvert extends AbstractConver {
    @Override
    public LocalDateTime convert(Number number) {
        Date date = new Date(number.longValue());
        return LocalDateTime.of(date.getYear()+1900
                ,date.getMonth()+1
                ,date.getDate()
                ,date.getHours()
                ,date.getMinutes()
                ,date.getSeconds());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy