Get the number of days, weeks, and months, since Epoch in Java
You can use the Joda Time library to do this pretty easily – I use it for anything time related other than using the standard Java Date and Calendar classes. Take a look at the example below using the library: MutableDateTime epoch = new MutableDateTime(); epoch.setDate(0); //Set to Epoch time DateTime now = new DateTime(); … Read more