class DomainParameterParser {

    public static Date parseDate(final String dateString) {
        Date date;
        try {
            date = new Date(Long.parseLong(dateString));
        } catch (final Exception ex) {
            try {
                date = simpleDateFormatTimeStamp.parse(dateString);
            } catch (final ParseException e) {
                log.info("Could not parse date: " + dateString);
                try {
                    date = simpleDateFormat.parse(dateString);
                } catch (final ParseException e1) {
                    log.error(e.getMessage());
                    throw new SpringBatchLightminApplicationException(e1, e1.getMessage());
                }
            }
        }
        return date;
    }

    private  DomainParameterParser();

}