android 怎么获得星期几?

//        处理首页时间
        final Calendar calendar = Calendar.getInstance();//获取实例
        calendar.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));//设置时区
        String curYear = String.valueOf(calendar.get(Calendar.YEAR));
        String curMon = String.valueOf(calendar.get(Calendar.MONTH) + 1);
        String curDay = String.valueOf(calendar.get(Calendar.DAY_OF_MONTH));
        String curWeek = String.valueOf(calendar.get(Calendar.DAY_OF_WEEK));
        switch (curWeek) {
            case "1":
                curWeek = "";
                break;
            case "2":
                curWeek = "";
                break;
            case "3":
                curWeek = "";
                break;
            case "4":
                curWeek = "";
                break;
            case "5":
                curWeek = "";
                break;
            case "6":
                curWeek = "";
                break;
            case "7":
                curWeek = "";
                break;

        }
        act_main_date.setText(curYear + "/" + curMon);
        act_main_week.setText("星期" + curWeek);
        act_main_day.setText(curDay);
        logI(curYear + "/" + curMon + curDay + "," + "星期" + curWeek);

你可能感兴趣的:(android 怎么获得星期几?)