Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
  2. formatter.setLenient(false);
  3. Calendar cal = Calendar.getInstance();
  4. Date myDate = formatter.parse("01/02/2014888");
  5. cal.setTime(myDate);
  6.  
  7. if (cal.get(Calendar.YEAR) > endOfTime) {
  8. // do something about it
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement