細心!用心!耐心!

          吾非文人,乃市井一俗人也,讀百卷書,跨江河千里,故申城一游; 一兩滴辛酸,三四年學業,五六點粗墨,七八筆買賣,九十道人情。

          BlogJava 聯系 聚合 管理
            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 張金鵬 閱讀(224) 評論(0)  編輯  收藏 所屬分類: core java中的一些數據結構的處理
          主站蜘蛛池模板: 乡宁县| 疏附县| 仪征市| 石嘴山市| 高要市| 昆山市| 海丰县| 兴义市| 昭通市| 于田县| 屯门区| 西乌珠穆沁旗| 屏东市| 东乡| 昌吉市| 临夏市| 潼关县| 德阳市| 安达市| 拜城县| 东阿县| 长岭县| 宕昌县| 衢州市| 普安县| 长汀县| 莎车县| 青阳县| 双柏县| 广灵县| 安陆市| 青海省| 鹤岗市| 武宁县| 扶绥县| 图木舒克市| 恩平市| 上思县| 玛多县| 普格县| 怀化市|