細(xì)心!用心!耐心!

          吾非文人,乃市井一俗人也,讀百卷書(shū),跨江河千里,故申城一游; 一兩滴辛酸,三四年學(xué)業(yè),五六點(diǎn)粗墨,七八筆買(mǎi)賣(mài),九十道人情。

          BlogJava 聯(lián)系 聚合 管理
            1 Posts :: 196 Stories :: 10 Comments :: 0 Trackbacks
          /**
          ? * 格式化日期1
          ? * */
          ??? public static String formatTime( Calendar cal, String format ){
          ??????? SimpleDateFormat localTimeFormatter
          ??????????? = new SimpleDateFormat(format);
          ??????? return localTimeFormatter.format(cal.getTime());
          ??? }
          ??? /**
          ? * 格式化日期2
          ? * */
          ??? public static Calendar formatDate( String time, String format ){
          ??????? try{
          ??????????? Date d = new Date();
          ??????????? SimpleDateFormat timeFormatter1
          ??????????????? = new SimpleDateFormat(format);
          ??????????? d = timeFormatter1.parse(time);
          ??????????? Calendar cal = Calendar.getInstance();
          ??????????? cal.setTime(d);
          ??????????? return cal;
          ??????? }catch ( Exception ex ){
          ??????????? log.error("error: ", ex);
          ??????????? return Calendar.getInstance();
          ??????? }
          ??? }
          posted on 2007-02-07 10:59 張金鵬 閱讀(220) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): core java中的一些數(shù)據(jù)結(jié)構(gòu)的處理
          主站蜘蛛池模板: 邵东县| 乌兰浩特市| 玛多县| 姚安县| 澄城县| 新密市| 德阳市| 津市市| 垦利县| 西峡县| 平阴县| 太保市| 千阳县| 绥宁县| 麻阳| 开化县| 武乡县| 新郑市| 洛浦县| 萍乡市| 纳雍县| 无极县| 新昌县| 巢湖市| 康马县| 明星| 望奎县| 新绛县| 乌审旗| 呼和浩特市| 小金县| 弥渡县| 绥江县| 桂东县| 自贡市| 中宁县| 子洲县| 舞钢市| 磐石市| 华蓥市| 乐陵市|