您的位置:首页 > 其它

得到当前日期是星期几

2015-10-12 15:50 246 查看
/**
* 日期工具类。
*
* @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;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: