List of usage examples for java.util Locale US
Locale US
To view the source code for java.util Locale US.
Click Source Link
From source file:Main.java
public static String generateUniqueID() { Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("ddMMyyyyHHmmss", Locale.US); return sdf.format(cal.getTime()); }
From source file:Main.java
public static String getCurrentTimeString() { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.US); return dateFormat.format(new Date()); }
From source file:Main.java
public static String strDate(Long dateMillis) { Date resultdate = new Date(dateMillis); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd", Locale.US); return df.format(resultdate); }
From source file:Main.java
public static String getStringFromDate(Calendar date, String format) { String string;/* w ww.ja v a 2 s. c o m*/ SimpleDateFormat form = new SimpleDateFormat(format, Locale.US); string = form.format(date.getTime()); return string; }
From source file:Main.java
public static String getDate(Date date) { SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy h:mm a", Locale.US); if (date != null) { return sdf.format(date); } else {/*from w ww . j av a 2 s . co m*/ return "Unknown"; } }
From source file:Main.java
public static String timestamp(Date date) { return new SimpleDateFormat(timestampFormat, Locale.US).format(date); }
From source file:Main.java
public static boolean isExynosDevice() { if (mIsExynosDevice != null) return mIsExynosDevice; mIsExynosDevice = Build.HARDWARE.toLowerCase(Locale.US).contains("smdk"); return mIsExynosDevice; }
From source file:Main.java
private static String getLogHeader() { DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss", Locale.US); return "[" + dateFormat.format(Calendar.getInstance().getTime()) + "] "; }
From source file:Main.java
public static String getStrDay() { Calendar now = Calendar.getInstance(); return new SimpleDateFormat("yyyy-MM-dd", Locale.US).format(now.getTime()); }
From source file:Main.java
public static String formatDate(Context applicationContext, long millis) { SimpleDateFormat format = new SimpleDateFormat("EEE, d MMM yyyy HH:mm", Locale.US); return format.format(new Date(millis)); }