Java ZonedDateTime Calculate difference(ZonedDateTime t1, ZonedDateTime t2)

Here you can find the source of difference(ZonedDateTime t1, ZonedDateTime t2)

Description

difference

License

Apache License

Declaration

public static long difference(ZonedDateTime t1, ZonedDateTime t2) 

Method Source Code

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

import java.time.ZonedDateTime;

public class Main {
    public static long difference(ZonedDateTime t1, ZonedDateTime t2) {
        return t2.toInstant().toEpochMilli() - t1.toInstant().toEpochMilli();
    }/*from w  w w.ja v  a 2 s  .  c om*/
}

Related

  1. cloneZonedDateTime(ZonedDateTime zonedDateTime)
  2. computeDays(ZonedDateTime Start, ZonedDateTime End)
  3. convertDateToZonedDateTime(Date date, String timezone)
  4. convertForPersistence(@Nullable ZonedDateTime dt)
  5. currentZonedDateTime()
  6. diffMs(ZonedDateTime date1, ZonedDateTime date2)
  7. elapsedTime(ZonedDateTime zonedDateTime)
  8. equals(ZonedDateTime ZDT1, ZonedDateTime ZDT2)
  9. filter(final Set list, final ZonedDateTime base, final long minute)