//DateCount.javaimport java.util.*;public class DateCount
{
public static void main(String[] args)
{
//获得今天是一周中的第几天
int now = Calendar.getInstance().get(Calendar.DAY_OF_WEEK);
System.out.println("今天是一周中的第" + now + "天");
//获得当前时间
long time = new Date().getTime();
Date d = new Date(time + (7-now) * 1000 * 60 * 60 * 24);
//System.out.println(d);
}
}
{
public static void main(String[] args)
{
//获得今天是一周中的第几天
int now = Calendar.getInstance().get(Calendar.DAY_OF_WEEK);
System.out.println("今天是一周中的第" + now + "天");
//获得当前时间
long time = new Date().getTime();
Date d = new Date(time + (7-now) * 1000 * 60 * 60 * 24);
//System.out.println(d);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货