Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.concurrent.TimeUnit;

public class Main {
    public static long getDaysDiff(long startTime, long endTime) {
        long msDiff;
        if (endTime > startTime) {
            msDiff = endTime - startTime;
        } else {
            msDiff = startTime - endTime;
        }
        // Log.e(TAG,"diff is  "+ daysDiff);
        return TimeUnit.MILLISECONDS.toDays(msDiff);
    }
}