package weaver.interfaces.htsc.wpscenter.utils;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;

public class DateFormatUtil {
    private DateFormat dateFormat;

    DateFormatUtil(){
        dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'",Locale.US);
        dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
    }

    public String formatDate(Date date){
        String dateFormated = dateFormat.format(date);
        return dateFormated;
    }

    public String getNowDate(){
        return formatDate(new Date());
    }

}
