Here you can find the source of formatEpoch(long date)
public static String formatEpoch(long date)
//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); } }