posts - 14,  comments - 37,  trackbacks - 0

           

           1public boolean compDate(String s1,String s2){
           2        int day=0
           3  SimpleDateFormat sf=new SimpleDateFormat("yyyy-MM-dd");
           4  GregorianCalendar calendar1=new GregorianCalendar();
           5  GregorianCalendar calendar2=new GregorianCalendar();
           6  //String s1="2006-04-21";
           7  //String s2="2006-04-25";
           8  Date xxx1=new Date();
           9  Date xxx2=new Date();
          10  try {
          11   xxx1=sf.parse(s1);
          12   xxx2=sf.parse(s2);
          13   day = (int) ((xxx2.getTime() - xxx1.getTime()) / 3600 / 24 / 1000);
          14  }
           catch (ParseException e) {
          15   // TODO Auto-generated catch block
          16   e.printStackTrace();
          17  }

          18  if(day>10){
          19   return true;
          20  }
          else{
          21   return false;
          22  }

          23  }
           
          posted on 2007-06-26 14:22 冰封的愛 閱讀(2864) 評論(0)  編輯  收藏 所屬分類: 技術
          <2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          常用鏈接

          留言簿(3)

          隨筆檔案

          文章分類

          文章檔案

          相冊

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 陕西省| 墨玉县| 武川县| 阜宁县| 高阳县| 梁平县| 通化县| 阳谷县| 临湘市| 惠水县| 叙永县| 德江县| 遂宁市| 竹山县| 日照市| 长海县| 临江市| 拜城县| 沅江市| 兴化市| 迭部县| 永定县| 安西县| 南康市| 固原市| 北安市| 仁寿县| 且末县| 洛阳市| 若尔盖县| 宁陵县| 白银市| 许昌市| 洛隆县| 饶阳县| 赤城县| 白山市| 林口县| 抚顺县| 晋中市| 时尚|