Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Calendar.getInstance();
- Date now = new Date(); // Gets the current date and time
- int year = now.getYear(); // Returns the # of years since 1900
- Calendar now = Calendar.getInstance(); // Gets the current date and time
- int year = now.get(Calendar.YEAR); // The current year
- GregorianCalendar gc = new GregorianCalendar(System.getCurrentTimeMillis());
- int year = gc.get(Calendar.YEAR);
Add Comment
Please, Sign In to add comment