public static String formatDate(final Date date) {
    Preconditions.checkNotNull(date, "Error: Date argument can't be null.");

    return DateFormat.getDateInstance().format(date);
  }
Helper class that provides quick access to common date/time functions.
java/zylib/src/main/java/com/google/security/zynamics/zylib/date/DateHelpers.java