List of usage examples for java.util Calendar DAY_OF_MONTH
int DAY_OF_MONTH
To view the source code for java.util Calendar DAY_OF_MONTH.
Click Source Link
get
and set
indicating the day of the month. From source file:Main.java
public static int getDay() { Calendar calendar = Calendar.getInstance(); return calendar.get(Calendar.DAY_OF_MONTH); }
From source file:Main.java
public static long firstOfTheMonth9am() { Calendar c = Calendar.getInstance(); c.set(Calendar.DAY_OF_MONTH, 1); c.set(Calendar.HOUR_OF_DAY, 9); c.set(Calendar.MINUTE, 0);// w ww. j a va 2 s.c o m c.set(Calendar.SECOND, 0); c.set(Calendar.MILLISECOND, 0); return c.getTimeInMillis(); }
From source file:Main.java
public static int currentDay() { Calendar calendar = Calendar.getInstance(); return calendar.get(Calendar.DAY_OF_MONTH); }
From source file:Main.java
public static int getDay() { return getCalendar(getCurrentDate()).get(Calendar.DAY_OF_MONTH); }
From source file:Main.java
public static String getDay() { Calendar calendar = Calendar.getInstance(); int day = calendar.get(Calendar.DAY_OF_MONTH); return Integer.toString(day); }
From source file:Main.java
public static long intID() { Calendar c = Calendar.getInstance(); int dia = c.get(Calendar.DAY_OF_MONTH); int ano = c.get(Calendar.YEAR) - 2010; int mes = c.get(Calendar.MONTH) + 1; int hora = c.get(Calendar.HOUR_OF_DAY); int minuto = c.get(Calendar.MINUTE); int segundo = c.get(Calendar.SECOND); int milisec = c.get(Calendar.MILLISECOND); return Long.parseLong("" + ano + mes + dia + hora + minuto + segundo + milisec); }
From source file:Main.java
public static int getDaysOfMonth() { return new GregorianCalendar().get(Calendar.DAY_OF_MONTH); }
From source file:Main.java
public static int getCurrentDayOfMonth() { Calendar calendar = Calendar.getInstance(); return calendar.get(Calendar.DAY_OF_MONTH); }
From source file:Main.java
public static void setToFirstDayInMonth(Calendar calendar) { calendar.set(Calendar.DAY_OF_MONTH, 1); calendar.getTimeInMillis(); }
From source file:Main.java
public static int getDayOfMonth() { return calendar.get(Calendar.DAY_OF_MONTH); }