isoweek.Week
提供了一个允许简单操作的周对象,例如
w = Week(2014,2)
print w+200
isoweek.Week(2017, 45)
以及比较操作。 Java或Android中有没有相同的东西?
答案 0 :(得分:1)
您可以执行以下操作,将日期添加到日历中。
public static void main(String[] args){
Calendar cal = Calendar.getInstance();
cal.set(Calendar.YEAR, 2014);
cal.set(Calendar.WEEK_OF_YEAR,2);
System.out.println(cal.get(Calendar.YEAR) + " "+ cal.get(Calendar.WEEK_OF_YEAR));
cal.add(Calendar.WEEK_OF_YEAR, 200);
System.out.println(cal.get(Calendar.YEAR) + " "+ cal.get(Calendar.WEEK_OF_YEAR));
}