Code example for ParseException

Methods: printStackTrace

0
			Date past = format.parse(temp);
			Date now = new Date();
 
			days = TimeUnit.MILLISECONDS.toDays(now.getTime() - past.getTime());
		} catch (ParseException e) {
			e.printStackTrace();
		} catch (java.text.ParseException e) {
			e.printStackTrace();
		} 
		String returnString = ""; // = temp;
		if (days == 0)
            returnString += "Postat idag";
        else if (days == 1) {
			returnString += "Postat igår";
		} else if (days > 1) {
			returnString += Long.toString(days) + " dagar sedan";
		} 
		return returnString;
	} 
 
	/**