Java Long Number to Date formatEpoch(long date)

Here you can find the source of formatEpoch(long date)

Description

format Epoch

License

Open Source License

Declaration

public static String formatEpoch(long date) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static SimpleDateFormat rubyDateFormat = new SimpleDateFormat("yyyy-MM-dd");

    public static String formatEpoch(long date) {
        final String parsedDate = rubyDateFormat.format(parseEpoch(date));
        assert (parsedDate != null);
        return parsedDate;
    }/*from  w  w  w .  ja  v  a  2  s .co m*/

    public static Date parseEpoch(long date) {
        return new Date(date);
    }
}

Related

  1. formatDateTime(long millis)
  2. formatDateTime(long time)
  3. formatDateTime(long timestampEpoch)
  4. formatDateTimeStamp(final long timeInMillis, final String dateFormatString)
  5. formateDate(Long date, String format)
  6. formatHttpDate(long d)
  7. formatHTTPDate(long pTime)
  8. formatHttpDate(long time)
  9. getDatebyLong(long dt)