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 boolean isEmpty(String str) { return null == str || "".equals(str) || "NULL".equals(str.toUpperCase(Locale.CHINA)); }
From source file:Main.java
private static long calcTimeBettwenZeroAndNow() { Calendar calendar = Calendar.getInstance(Locale.CHINA); calendar.setTimeInMillis(System.currentTimeMillis()); int currentHour = calendar.get(calendar.HOUR); calendar.add(Calendar.HOUR, 24 - currentHour); return calendar.getTimeInMillis(); }
From source file:Main.java
public static String getTime() { return new SimpleDateFormat("MM-dd HH:mm", Locale.CHINA).format(new Date()); }
From source file:Main.java
public static int formatMonth(long lefttime) { SimpleDateFormat sdf = new SimpleDateFormat("MM", Locale.CHINA); String sDateTime = sdf.format(lefttime); int i = Integer.parseInt(sDateTime); return i;//from w w w . ja v a 2 s .c om }
From source file:Main.java
public static int getWeekOfDate() { Calendar calendar = Calendar.getInstance(Locale.CHINA); calendar.setTime(new Date()); int k = calendar.get(Calendar.DAY_OF_WEEK) - 1; if (k < 1) k = 7;/*w w w . j a va 2 s. co m*/ return k; }
From source file:Main.java
public static int formatYear(long lefttime) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy", Locale.CHINA); String sDateTime = sdf.format(lefttime); int i = Integer.parseInt(sDateTime); return i;// www . j a v a2 s . c o m }
From source file:Main.java
public static String formatTime(long lefttime) { SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss", Locale.CHINA); String sDateTime = sdf.format(lefttime); return sDateTime; }
From source file:Main.java
public static String getTimeString(long timemillis) { return new SimpleDateFormat("mm:ss", Locale.CHINA).format(new Date(timemillis)); }
From source file:Main.java
public static String formatDate(long lefttime) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA); String sDateTime = sdf.format(lefttime); return sDateTime; }
From source file:Main.java
public static String formatTimeSimple(long lefttime) { SimpleDateFormat sdf = new SimpleDateFormat("HH:mm", Locale.CHINA); String sDateTime = sdf.format(lefttime); return sDateTime; }