package cn.freemud.utils;

import java.util.Calendar;
import java.util.Date;

public class DateUtils {

    /**
     * 对传入的时间翻译星期
     * @param date
     * @return
     */
    public static String getDayWeek(Date date){
        if (date == null ){
            return null;
        }
        String[] week={"(周日)","(周一)","(周二)","(周三)","(周四)","(周五)","(周六)"};
        Calendar calendar =Calendar.getInstance();
        calendar.setTime(date);
        int w = calendar.get(Calendar.DAY_OF_WEEK) -1 ;
        if (w < 0 ){
            w =0;
        }
        return week[w];
    }



}
