posts - 27,comments - 2,trackbacks - 0
           
                
                /**
          * 得到幾天前的時(shí)間
          * @param d
          * @param day
          * @return
          */
          public static Date getDateOfBefore(Date d, int day) {
          Calendar now = Calendar.getInstance();
          now.setTime(d);
          now.set(Calendar.DATE, now.get(Calendar.DATE) - day);
          return now.getTime();
          }
                /**
          * 得到幾天后的時(shí)間
          * @param d
          * @param day
          * @return
          */
          public static Date getDateOfAfter(Date d, int day) {
          Calendar now = Calendar.getInstance();
          now.setTime(d);
          now.set(Calendar.DATE, now.get(Calendar.DATE) + day);
          return now.getTime();
          }
          posted on 2013-06-28 17:55 魏文甫 閱讀(287) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 金阳县| 邮箱| 霍邱县| 湘乡市| 眉山市| 广丰县| 精河县| 萝北县| 东阿县| 仲巴县| 谢通门县| 沿河| 开远市| 临高县| 安义县| 南京市| 南靖县| 鞍山市| 武山县| 镇坪县| 平顶山市| 三门峡市| 闸北区| 罗甸县| 七台河市| 万载县| 丰宁| 临武县| 汉沽区| 江西省| 容城县| 塔河县| 田阳县| 探索| 和林格尔县| 湟中县| 临猗县| 长春市| 东港市| 西青区| 资溪县|