posts - 6,comments - 0,trackbacks - 0


           1     /**
           2      * 取得指定年月的當月總天數
           3      * @param year 年
           4      * @param month 月
           5      * @return 當月總天數
           6      */
           7     public static int getLastDay(int year, int month) {
           8         int day = 1;
           9         Calendar cal = Calendar.getInstance();
          10         cal.set(year,month - 1,day);
          11         int last = cal.getActualMaximum(Calendar.DATE);
          12         System.out.println(last);
          13         return last;
          14     }
          posted on 2010-01-21 09:32 myProMark 閱讀(2263) 評論(0)  編輯  收藏 所屬分類: J2SE

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


          網站導航:
           
          主站蜘蛛池模板: 南和县| 宿迁市| 东至县| 海伦市| 河南省| 沙坪坝区| 安顺市| 介休市| 奉贤区| 灌阳县| 广水市| 康保县| 恭城| 新建县| 江西省| 高台县| 万盛区| 磐石市| 郓城县| 阳泉市| 潜江市| 陆良县| 宣恩县| 茂名市| 缙云县| 泗水县| 辽源市| 建瓯市| 长子县| 大城县| 芜湖市| 新建县| 湛江市| 夏邑县| 武陟县| 苏尼特左旗| 云安县| 雅安市| 济南市| 馆陶县| 扎赉特旗|