List of usage examples for java.text SimpleDateFormat SimpleDateFormat
public SimpleDateFormat(String pattern)
SimpleDateFormat
using the given pattern and the default date format symbols for the default java.util.Locale.Category#FORMAT FORMAT locale. From source file:Main.java
public static String getDateFromMillis(long time) { String curStringDate = new SimpleDateFormat("dd MM yyyy").format(time); return curStringDate; }
From source file:Main.java
public static String getSystemMonthDay() { return new SimpleDateFormat("MMdd").format(new Date()); }
From source file:Main.java
public static String millisTime(long time) { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(time)); }
From source file:Main.java
public static String formatDate(long timeStamp) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String date = sdf.format(timeStamp * 1000); return date;//from w ww. j av a 2s.c o m }
From source file:Main.java
public static String getFullDate(long date) { SimpleDateFormat fullDateFormat = new SimpleDateFormat("dd.MM.yy HH:mm"); return fullDateFormat.format(date); }
From source file:Main.java
public static String getCurrentDate() { String str = (new SimpleDateFormat("yyyy-MM-dd")).format(new Date()); return str;/*w ww.j a v a 2 s .com*/ }
From source file:Main.java
public static SimpleDateFormat getDateFormat() { SimpleDateFormat formatter = new SimpleDateFormat("MMM dd"); return formatter; }
From source file:Main.java
public static String toDateString(Date date) { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date); }
From source file:Main.java
public static String getDayOfMonth(Date date) { return new SimpleDateFormat("dd").format(date); }
From source file:Main.java
public static String getDateTitle(Date date) { return new SimpleDateFormat("EE, MMM d").format(date); }