diff --git a/src/com/rjconsultores/ventaboletos/utilerias/DateUtil.java b/src/com/rjconsultores/ventaboletos/utilerias/DateUtil.java index 89880deba..471403714 100644 --- a/src/com/rjconsultores/ventaboletos/utilerias/DateUtil.java +++ b/src/com/rjconsultores/ventaboletos/utilerias/DateUtil.java @@ -23,6 +23,14 @@ public final class DateUtil { public static Integer DIA = Integer.valueOf(1000 * 60 * 60 * 24); 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 ddMMaa = "dd/MM/yyyy"; public static String HHmm = "HH:mm"; @@ -256,6 +264,11 @@ public final class DateUtil { return null; } + /** + * Formato 12 horas + * @param d + * @return + */ public static String getStringDateHour(java.util.Date d) { if (d != null) { DateFormat df = new SimpleDateFormat(ddMMaaHHmm); @@ -263,7 +276,19 @@ public final class DateUtil { } 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) { return getStringDate(d, "dd/MM/yyyy"); }