Here you can find the source of timeDiff(Calendar c1, Calendar c2)
Parameter | Description |
---|---|
c1 | a parameter |
c2 | a parameter |
public static long timeDiff(Calendar c1, Calendar c2)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { /**// w ww.ja v a 2 s .co m * Diffs two Calendar instances (C2 - C1) * * @param c1 * @param c2 * @return Difference in milliseconds (C2 - C1) */ public static long timeDiff(Calendar c1, Calendar c2) { return (c2.getTimeInMillis() - c1.getTimeInMillis()) / 1000; } }