多语言适配:部分布局属性修改(left->start、right->end等)
This commit is contained in:
@@ -50,12 +50,12 @@ public class TimeUtils {
|
||||
public static final long MILLIS_OF_SEC = 1000;
|
||||
|
||||
public static String getCurrentDateStr() {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT, Locale.getDefault());
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT, Locale.ENGLISH);
|
||||
return dateFormat.format(new Date());
|
||||
}
|
||||
|
||||
public static String getCurrentTimeStr() {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(TIME_FORMAT, Locale.getDefault());
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(TIME_FORMAT, Locale.ENGLISH);
|
||||
return dateFormat.format(new Date());
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ public class TimeUtils {
|
||||
public static String getDateTimeString(long milliseconds, String format) {
|
||||
String result = null;
|
||||
try {
|
||||
SimpleDateFormat formatter = new SimpleDateFormat(format, Locale.getDefault());
|
||||
SimpleDateFormat formatter = new SimpleDateFormat(format, Locale.ENGLISH);
|
||||
Date date = new Date(milliseconds);
|
||||
result = formatter.format(date);
|
||||
} catch (Exception ex) {
|
||||
@@ -230,7 +230,7 @@ public class TimeUtils {
|
||||
|
||||
public static long getTimeMillis(String time, String format) {
|
||||
try {
|
||||
SimpleDateFormat formatter = new SimpleDateFormat(format, Locale.getDefault());
|
||||
SimpleDateFormat formatter = new SimpleDateFormat(format, Locale.ENGLISH);
|
||||
Date date = formatter.parse(time);
|
||||
return date.getTime();
|
||||
} catch (Exception ex) {
|
||||
|
Reference in New Issue
Block a user