Java Second Format toSecondString(long time)

Here you can find the source of toSecondString(long time)

Description

to Second String

License

Open Source License

Declaration

public static String toSecondString(long time) 

Method Source Code

//package com.java2s;
/**/*from  ww  w  .j a  v a2 s .co m*/
 * This file is part of JEMMA - http://jemma.energy-home.org
 * (C) Copyright 2013 Telecom Italia (http://www.telecomitalia.it)
 *
 * JEMMA is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License (LGPL) version 3
 * or later as published by the Free Software Foundation, which accompanies
 * this distribution and is available at http://www.gnu.org/licenses/lgpl.html
 *
 * JEMMA is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License (LGPL) for more details.
 *
 */

import java.text.SimpleDateFormat;

public class Main {
    private static final SimpleDateFormat secondsFormatter = new SimpleDateFormat("EEE,kk:mm:ss");

    public static String toSecondString(long time) {
        return secondsFormatter.format(time);
    }
}

Related

  1. secondsToHumanDate(long seconds)
  2. secondsToString(long seconds)
  3. secondsToStringFormat(long seconds)
  4. secondsToTime(double seconds)
  5. secondsToTimeString(long numSeconds)