class DateUtils {

    public static Long parseDateAsTimestamp(String date) throws UnparsableDateFormatException {
        if (date != null) {
            try {
                return Long.valueOf(date);
            } catch (NumberFormatException e) {
                for (SimpleDateFormat f : formats) {
                    try {
                        Date d = f.parse(date);
                        return d.getTime();
                    } catch (ParseException ex) {
                    }

                }
            }
        }
        throw new UnparsableDateFormatException();

    }

    private  DateUtils();

}