add Weeks to LocalDateTime - Java java.time

Java examples for java.time:LocalDateTime

Description

add Weeks to LocalDateTime

Demo Code


//package com.java2s;

import java.time.LocalDateTime;

public class Main {
    public static LocalDateTime addWeeks(LocalDateTime inputDateTime,
            int weeksToAdd) {
        return inputDateTime.plusWeeks(weeksToAdd);
    }/*from  ww w  .  j av a  2 s  .  c  o m*/
}

Related Tutorials