add Hours to LocalDateTime - Java java.time

Java examples for java.time:LocalDateTime

Description

add Hours to LocalDateTime

Demo Code


//package com.java2s;

import java.time.LocalDateTime;

public class Main {
    public static LocalDateTime addHours(LocalDateTime inputDateTime,
            int hoursToAdd) {
        return inputDateTime.plusHours(hoursToAdd);
    }/*from  ww  w.j av  a2s  . c om*/
}

Related Tutorials