得到当前日期是星期几

来源:互联网 发布:sqlserver日常维护 编辑:程序博客网 时间:2024/06/03 02:26
/** * 日期工具类。 *  * @author Geek_Soledad (66704238@51uc.com) */public class DateUtil {   /**    * 得到当前日期是星期几。    *     * @return 当为周日时,返回0,当为周一至周六时,则返回对应的1-6    */   public static final int getCurrentDayOfWeek() {      return Calendar.getInstance().get(Calendar.DAY_OF_WEEK) - 1;   }}
0 0