com.veight.common.utils.DateUtils.java Source code

Java tutorial

Introduction

Here is the source code for com.veight.common.utils.DateUtils.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.veight.common.utils;

import java.util.Date;
import org.apache.commons.lang3.time.DateFormatUtils;

/**
 *
 * @author youyou
 */
public class DateUtils {

    /**
     * ?
     */
    private static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";

    /**
     * ?
     */
    private String dateFormat = DEFAULT_DATE_FORMAT;

    /**
     * ?
     *
     * @return 
     */
    public static String format(Date date) {
        return DateFormatUtils.format(date, DEFAULT_DATE_FORMAT);
    }

}