18 package org.turro.wd.common.entities;
21 import java.text.ParseException;
22 import java.text.SimpleDateFormat;
23 import java.util.Date;
24 import javax.activation.MimetypesFileTypeMap;
32 private static final String DATE_FORMAT =
"yyyyMMddHHmm";
33 private static SimpleDateFormat dateFormat =
new SimpleDateFormat(DATE_FORMAT);
36 public static Date
parse(String date)
throws ParseException {
37 return dateFormat.parse(date);
40 public static String
format(Date date) {
41 return dateFormat.format(date);
44 public static String
format(
long time) {
45 return dateFormat.format(
new Date(time));
48 public static boolean before(Date date,
long time)
throws ParseException {
52 public static boolean after(Date date,
long time)
throws ParseException {