| | |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * 时间戳转日期(格式:MM-dd) |
| | | * |
| | | * @param timestamp 时间戳 |
| | | * ¬ * @return - |
| | | */ |
| | | public static String getDataFromTimestamp(long timestamp) { |
| | | try { |
| | | String pattern = "MM-dd"; |
| | | if (UserConfigManage.getInstance().getCurrentAppLanguage().equals(LocalManageUtil.en)) { |
| | | pattern = "dd-MM"; |
| | | } |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat(pattern, getLocale()); |
| | | Date date = new Date(timestamp); |
| | | return dateFormat.format(date); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 时间戳转时间(格式:yyyy-MM-dd HH:mm:ss) |