fixes bug#19994

qua:
dev:Valdir
Alteração corrigir o fotmato da data para 24hs.

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@103185 d1611594-4594-4d17-8e1d-87c2c4800839
master
valdevir 2020-09-04 16:03:28 +00:00
parent a13b17a32d
commit bbf65189bb
1 changed files with 26 additions and 1 deletions

View File

@ -23,6 +23,14 @@ public final class DateUtil {
public static Integer DIA = Integer.valueOf(1000 * 60 * 60 * 24); public static Integer DIA = Integer.valueOf(1000 * 60 * 60 * 24);
public static Integer UM_DIA = Integer.valueOf(1); public static Integer UM_DIA = Integer.valueOf(1);
/**
* Formato 24Hs
*/
public static String ddMMaaHH24mm = "dd/MM/yyyy HH:mm";
/**
* Formato 12hs
*/
public static String ddMMaaHHmm = "dd/MM/yyyy hh:mm"; public static String ddMMaaHHmm = "dd/MM/yyyy hh:mm";
public static String ddMMaa = "dd/MM/yyyy"; public static String ddMMaa = "dd/MM/yyyy";
public static String HHmm = "HH:mm"; public static String HHmm = "HH:mm";
@ -256,6 +264,11 @@ public final class DateUtil {
return null; return null;
} }
/**
* Formato 12 horas
* @param d
* @return
*/
public static String getStringDateHour(java.util.Date d) { public static String getStringDateHour(java.util.Date d) {
if (d != null) { if (d != null) {
DateFormat df = new SimpleDateFormat(ddMMaaHHmm); DateFormat df = new SimpleDateFormat(ddMMaaHHmm);
@ -264,6 +277,18 @@ public final class DateUtil {
return null; return null;
} }
/**
* Formato 24 horas
* @param d
* @return
*/
public static String getStringDate24Hour(java.util.Date d) {
if (d != null) {
DateFormat df = new SimpleDateFormat(ddMMaaHH24mm);
return df.format(d);
}
return null;
}
public static String getStringDate(java.util.Date d) { public static String getStringDate(java.util.Date d) {
return getStringDate(d, "dd/MM/yyyy"); return getStringDate(d, "dd/MM/yyyy");
} }