List of usage examples for java.util Calendar getTime
public final Date getTime()
Date
object representing this Calendar
's time value (millisecond offset from the Epoch"). From source file:Main.java
public static void main(String[] args) { Calendar now = Calendar.getInstance(); System.out.println(now.getTime()); System.out.println(now.get(Calendar.DAY_OF_MONTH)); }
From source file:Main.java
public static void main(String[] args) { Calendar now = Calendar.getInstance(); System.out.println(now.getTime()); System.out.println(now.get(Calendar.ERA)); }
From source file:Main.java
public static void main(String[] args) { Calendar now = Calendar.getInstance(); System.out.println(now.getTime()); System.out.println(now.get(Calendar.DAY_OF_YEAR)); }
From source file:Main.java
public static void main(String[] args) { Calendar now = Calendar.getInstance(); System.out.println(now.getTime()); System.out.println(now.get(Calendar.DAY_OF_WEEK_IN_MONTH)); }
From source file:Main.java
public static void main(String[] args) { Calendar now = Calendar.getInstance(); System.out.println(now.getTime()); System.out.println(now.get(Calendar.WEEK_OF_YEAR)); }
From source file:Main.java
public static void main(String[] args) { Calendar now = Calendar.getInstance(); System.out.println(now.getTime()); System.out.println(now.get(Calendar.HOUR_OF_DAY)); }
From source file:Main.java
public static void main(String[] args) { Calendar now = Calendar.getInstance(); System.out.println(now.getTime()); System.out.println(now.get(Calendar.WEEK_OF_MONTH)); }
From source file:Main.java
public static void main(String[] args) { Calendar now = Calendar.getInstance(); System.out.println(now.getTime()); now.setWeekDate(2013, 12, 2);//from w ww .java 2s . co m System.out.println(now.getTime()); }
From source file:Main.java
public static void main(String[] args) { Calendar cal = new GregorianCalendar(); System.out.println(cal.getTime()); cal.set(Calendar.AM_PM, Calendar.AM); System.out.println(cal.getTime()); }
From source file:Main.java
public static void main(String[] args) { Calendar cal = new GregorianCalendar(); System.out.println(cal.getTime()); cal.set(Calendar.AM_PM, Calendar.PM); System.out.println(cal.getTime()); }