Java LocalDateTime to getDifference(LocalDateTime sourceTime, LocalDateTime targetTime)

Here you can find the source of getDifference(LocalDateTime sourceTime, LocalDateTime targetTime)

Description

get Difference

License

Apache License

Declaration

public static long getDifference(LocalDateTime sourceTime, LocalDateTime targetTime) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;

public class Main {
    public static long getDifference(LocalDateTime sourceTime, LocalDateTime targetTime) {
        return targetTime.until(sourceTime, ChronoUnit.MINUTES);
    }// w  w w  . ja  va 2s. co  m
}

Related

  1. convertToDate(LocalDateTime dateTime)
  2. fromLocalDateTime(LocalDateTime _ldt)
  3. getDate(LocalDateTime time)
  4. getDateTimeText(LocalDateTime dateTime)
  5. getDelayUntil(final LocalDateTime ldt)
  6. getDurationInMillis(LocalDateTime from, LocalDateTime to)
  7. getDurationString(LocalDateTime start, LocalDateTime end, ChronoUnit unit)
  8. getHoursElapsed(LocalDateTime fromDate)
  9. getMillis(LocalDateTime time)