public static Date getNextMonth() { Date current = new Date(); Calendar c = Calendar.getInstance(); c.setTime(current); c.add(Calendar.MONTH, 1); c.set(Calendar.DATE, 1); c.set(Calendar.HOUR, 0); c.set(Calendar.MINUTE, 0); c.set(Calendar.SECOND, 0); return c.getTime(); } Date nextMonth = getNextMonth(); System.out.println(nextMonth);
Showing posts with label next month. Show all posts
Showing posts with label next month. Show all posts
Tuesday, November 26, 2013
First day of next month with java Time
Subscribe to:
Posts (Atom)