code: public static Date formatDate(Date orig, String... patterns) {
          String pattern = TIMESTAMP_PATTERN;
          if (patterns != null && patterns.length > 0
                  && StringUtils.isNotBlank(patterns[0])) {
              pattern = patterns[0];
          }
          return parseDate(DateFormatUtils.format(orig, pattern));
      }
docs: 格式化日期为指定格式<br>
  generate by: vakin jiang at 2012-3-7
  
  @param orig
  @param patterns
  @return