小编Sun*_*wal的帖子

如何获得日期的工作日?

我希望从Java Date对象获取星期几,当我有一个DateString 数组时,我.

SimpleDateFormat  sourceDateformat = new SimpleDateFormat("yyyy-MM-dd");
public String[] temp_date;
public Int[] day = new Int[5];
Date[] d1= new Date[5];
Calendar[] cal= new Calendar[5]

  try {
     d1[i]= sourceDateformat.parse(temp_date[i].toString());
     cal[i].setTime(d1[i]);   // its not compiling this line..showing error on this line
     day[i]= cal[i].get(Calendar.DAY_OF_WEEK);      
    } 
 catch (ParseException e) {
        e.printStackTrace();
    }
Run Code Online (Sandbox Code Playgroud)

有谁知道答案吗?

android calendar date

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

android ×1

calendar ×1

date ×1