valdevir 2016-11-10 13:35:57 +00:00
parent 5f59f0456c
commit d881b5ed27
1 changed files with 7 additions and 5 deletions

View File

@ -25,7 +25,6 @@ public final class DateUtil {
public static String ddMMaaHHmm = "dd/MM/yyyy hh:mm";
public static String ddMMaa = "dd/MM/yyyy";
/**
* No need for an instance
*/
@ -612,11 +611,14 @@ public final class DateUtil {
public static boolean isCompetenciaValida(String competencia) {
if (StringUtils.isNotBlank(competencia)) {
String mesString = competencia.split("/")[0].replaceAll("_", "");
if (StringUtils.isNotBlank(mesString)) {
Integer mes = Integer.valueOf(competencia.split("/")[0]);
Integer minMes = Calendar.JANUARY + 1;
Integer maxMes = Calendar.DECEMBER + 1;
return mes >= minMes && mes <= maxMes;
}
}
return false;
}