Here you can find the source of calculateDhms(int seconds)
public static int[] calculateDhms(int seconds)
//package com.java2s; //License from project: Apache License public class Main { public static int[] calculateDhms(int seconds) { final int day = seconds / 86400; final int hour = seconds % 86400 / 3600; final int minute = seconds % 86400 % 3600 / 60; final int second = seconds % 86400 % 3600 % 60; return new int[] { day, hour, minute, second }; }/*w w w.j a va 2 s. c o m*/ }