class OcrResponseParser {

    @Nullable
    public Date getDate() {
        if (ocrResponse != null && ocrResponse.getDate() != null && ocrResponse.getDate().getData() != null && ocrResponse.getDate().getConfidenceLevel() > MINIMUM_DATE_CONFIDENCE) {
            try {
                final SimpleDateFormat iso8601Formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US);
                final GregorianCalendar ocrResponseCalendar = new GregorianCalendar();
                ocrResponseCalendar.setTime(iso8601Formatter.parse(ocrResponse.getDate().getData()));
                ocrResponseCalendar.set(Calendar.HOUR_OF_DAY, 0);
                ocrResponseCalendar.set(Calendar.MINUTE, 0);
                ocrResponseCalendar.set(Calendar.SECOND, 0);
                ocrResponseCalendar.set(Calendar.MILLISECOND, 0);

                // Shift this by the current time (local) for hours/mins/secs/m
                final GregorianCalendar localTimeCalendar = new GregorianCalendar();
                localTimeCalendar.setTime(new Date(System.currentTimeMillis()));
                ocrResponseCalendar.add(Calendar.HOUR_OF_DAY, localTimeCalendar.get(Calendar.HOUR_OF_DAY));
                ocrResponseCalendar.add(Calendar.MINUTE, localTimeCalendar.get(Calendar.MINUTE));
                ocrResponseCalendar.add(Calendar.SECOND, localTimeCalendar.get(Calendar.SECOND));
                ocrResponseCalendar.add(Calendar.MILLISECOND, localTimeCalendar.get(Calendar.MILLISECOND));

                return new Date(ocrResponseCalendar.getTime().getTime());
            } catch (ParseException e) {
                Logger.error(this, "Failed to parse OCR Date.", e);
            }
        }
        return null;
    }

    public  OcrResponseParser(@Nullable OcrResponse ocrResponse);

}