得到某一天是星期幾

          //獲取yyyy-MM-dd是星期幾
          public static int getWeekdayOfDateTime(String datetime){
             DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
             Calendar c = Calendar.getInstance();  
                try {
            c.setTime(df.parse(datetime));
             } catch (Exception e) {
            e.printStackTrace();
             }
             int weekday = c.get(Calendar.DAY_OF_WEEK)-1;
             return weekday;
          }

          posted on 2007-06-26 13:25 付軒 閱讀(2636) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2007年6月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          1234567

          導航

          統計

          常用鏈接

          留言簿(2)

          隨筆檔案

          相冊

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 江西省| 海安县| 尼勒克县| 高尔夫| 陆良县| 井陉县| 纳雍县| 手机| 依安县| 南川市| 广水市| 北碚区| 墨竹工卡县| 应用必备| 舟曲县| 云龙县| 惠东县| 垦利县| 杨浦区| 镇原县| 岳阳市| 汽车| 陆丰市| 航空| 金湖县| 章丘市| 盐源县| 肇东市| 汝州市| 张掖市| 二连浩特市| 夹江县| 伊宁市| 肇东市| 扎赉特旗| 阜南县| 枣庄市| 三河市| 托里县| 博兴县| 襄樊市|