in Between LocalDateTime - Java java.time

Java examples for java.time:LocalDateTime

Description

in Between LocalDateTime

Demo Code


//package com.java2s;

import java.time.LocalDateTime;

public class Main {
    public static boolean inBetween(LocalDateTime middle,
            LocalDateTime interval_start, LocalDateTime interval_end) {
        return middle.isAfter(interval_start)
                && middle.isBefore(interval_end);
    }//from  w  w w  .ja v a  2 s. c  o  m
}

Related Tutorials