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)

          隨筆檔案

          文章分類

          文章檔案

          相冊

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 湖州市| 普陀区| 武隆县| 迁安市| 闵行区| 嵩明县| 洪洞县| 治多县| 阳高县| 松江区| 墨竹工卡县| 墨脱县| 涟水县| 象山县| 和田县| 乳源| 长兴县| 舒兰市| 临汾市| 呼和浩特市| 枞阳县| 合山市| 许昌县| 涿鹿县| 大方县| 炎陵县| 邵阳县| 丹阳市| 江孜县| 依兰县| 澄城县| 凤台县| 左贡县| 建宁县| 高州市| 天津市| 集安市| 眉山市| 牟定县| 教育| 扎赉特旗|