List of usage examples for java.util Locale CHINA
Locale CHINA
To view the source code for java.util Locale CHINA.
Click Source Link
From source file:Main.java
public static String getCurrentMonthFirstDay(long time) { DateFormat dateFormat = new SimpleDateFormat("yyyy-MM", Locale.CHINA); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(dateFormat.format(time)); stringBuilder.append("-"); stringBuilder.append(1);//from www . ja v a 2 s. co m return stringBuilder.toString(); }
From source file:Main.java
public static String formatTimeWithYMD(long millis, String style) { SimpleDateFormat format = new SimpleDateFormat(style, Locale.CHINA); // "yyyy-MM-dd // HH:mm:ss"/*from w ww . j a va 2 s. c o m*/ Date date = new Date(millis); return format.format(date); }
From source file:Main.java
public static String getCurrentDate(String format) { return new SimpleDateFormat(format, Locale.CHINA).format(new Date()); }
From source file:Main.java
public static final String getStandardTime(int minute, int hour) { SimpleDateFormat format = new SimpleDateFormat("HH:mm", Locale.CHINA); Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.MINUTE, minute); calendar.set(Calendar.HOUR_OF_DAY, hour); return format.format(calendar.getTime()); }
From source file:Main.java
public static String getSpecialTime(Date specialDate, String pattern) { SimpleDateFormat dateFormat = new SimpleDateFormat(pattern, Locale.CHINA); return dateFormat.format(specialDate); }
From source file:Main.java
public static String getPicName() { new DateFormat(); return DateFormat.format("yyyyMMddhhmmss", Calendar.getInstance(Locale.CHINA)) + ".png"; }
From source file:Main.java
public static String getSystime() { String systime;/*from w ww . j a va 2s . co m*/ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss EEEE", Locale.CHINA); systime = dateFormat.format(new Date(System.currentTimeMillis())); return systime; }
From source file:Main.java
public static final String getStandardDate(int day, int month, int year) { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA); Calendar calendar = Calendar.getInstance(); calendar.set(year, month, day);/*from ww w . java 2s.c o m*/ return format.format(calendar.getTime()); }
From source file:Main.java
public static String now() { Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.CHINA); return sdf.format(cal.getTime()); }
From source file:Main.java
public static String formatDateTime(long d, String fmt) { SimpleDateFormat format = new SimpleDateFormat(fmt, Locale.CHINA); return format.format(new Date(d)); }