public class TimeDiff extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TimeDiff.TimeField |
| Constructor and Description |
|---|
TimeDiff() |
| Modifier and Type | Method and Description |
|---|---|
static long[] |
getTimeDifference(Date d1,
Date d2)
Calculate the absolute difference between two Date without regard for
time offsets
|
static long |
getTimeDifference(Date d1,
Date d2,
TimeDiff.TimeField field)
Calculate the absolute difference between two Date without regard for
time offsets
|
static void |
main(String[] args)
(For testing purposes)
|
static void |
printDiffs(long[] diffs) |
public static void main(String[] args)
public static long getTimeDifference(Date d1, Date d2, TimeDiff.TimeField field)
d1 - Date oned2 - Date twofield - The field we're interested in out of day, hour, minute,
second, millisecondpublic static long[] getTimeDifference(Date d1, Date d2)
d1 - Date oned2 - Date twopublic static void printDiffs(long[] diffs)
Copyright © 2008-2014 Logical Objects. All Rights Reserved.