|
@@ -1185,6 +1185,26 @@ public class DateUtil { |
|
|
return retStamp; |
|
|
return retStamp; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static String getHalfEndYm(String ymPeriod) { |
|
|
|
|
|
try { |
|
|
|
|
|
String year = ymPeriod.substring(0, 4); |
|
|
|
|
|
String month = ymPeriod.substring(4); |
|
|
|
|
|
if (month.startsWith("0")) { |
|
|
|
|
|
int m = Integer.parseInt(month.substring(1)); |
|
|
|
|
|
if (m > 6) { |
|
|
|
|
|
ymPeriod = year + "12"; |
|
|
|
|
|
} else { |
|
|
|
|
|
ymPeriod = year + "06"; |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
ymPeriod = year + "12"; |
|
|
|
|
|
} |
|
|
|
|
|
return ymPeriod; |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
return ymPeriod; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//获取年月,YYYYMM格式 |
|
|
//获取年月,YYYYMM格式 |
|
|
public static String getDateYm(Date dt) { |
|
|
public static String getDateYm(Date dt) { |
|
|
String s = simpleDateFormat.get().format(dt); |
|
|
String s = simpleDateFormat.get().format(dt); |
|
|