获取星期:
Calendar calendar = Calendar.getInstance();
int number = calendar.get(Calendar.DAY_OF_WEEK);//星期表示1-7,是从星期日开始,
String [] str = {"","星期日","星期一","星期二","星期三","星期四","星期五","星期六",};
当前星期即为 str[number]
over!!!
本文共 256 字,大约阅读时间需要 1 分钟。
获取星期:
Calendar calendar = Calendar.getInstance();
int number = calendar.get(Calendar.DAY_OF_WEEK);//星期表示1-7,是从星期日开始,
String [] str = {"","星期日","星期一","星期二","星期三","星期四","星期五","星期六",};
当前星期即为 str[number]
over!!!
转载于:https://my.oschina.net/xiaoyuHe/blog/478729