Java Day Convert To day2msec(int day)

Here you can find the source of day2msec(int day)

Description

converts day to millisecond

License

Open Source License

Parameter

Parameter Description
day time as day

Return

time as millisecond

Declaration

public static long day2msec(int day) 

Method Source Code

//package com.java2s;
/*/*from   ww  w  .j  a v  a  2s . c  o m*/
 License:
    
 blueprint-sdk is licensed under the terms of Eclipse Public License(EPL) v1.0
 (http://www.eclipse.org/legal/epl-v10.html)
    
    
 Distribution:
    
 Repository - https://github.com/lempel/blueprint-sdk.git
 Blog - http://lempel.egloos.com
 */

public class Main {
    /**
     * converts day to millisecond
     *
     * @param day time as day
     * @return time as millisecond
     */
    public static long day2msec(int day) {
        return hour2msec(day * 24);
    }

    /**
     * converts hour to millisecond
     *
     * @param hour time as hour
     * @return time as millisecond
     */
    public static long hour2msec(int hour) {
        return min2msec(hour * 60);
    }

    /**
     * converts minute to millisecond
     *
     * @param min time as minute
     * @return time as millisecond
     */
    public static long min2msec(int min) {
        return sec2msec(min * 60);
    }

    /**
     * @param sec time as second
     * @return time as millisecond
     */
    public static long sec2msec(int sec) {
        return sec * 1000;
    }
}

Related

  1. day2doy(int year, int month, int mday)
  2. day2String(int dayofweek)
  3. daysToSecs(long days)
  4. daysToTicks(double x)
  5. daysToYears(int days)