📄 convertdate.java
字号:
//package com.aptech.util.date;
//
//import java.text.Format;
//import java.text.SimpleDateFormat;
//import java.util.Date;
//
//public class ConvertDate {
//
// public ConvertDate() {
// }
//
// public static String date2Str(Date date) {
//
// String strRtn = null;
// if (date == null) {
// return "";
// }
// Format fmt = new SimpleDateFormat("yyyy/MM/dd");
// try {
// } catch (Exception e) {
// e.printStackTrace();
// }
// return strRtn;
// }
//
// public static String date2Str(Date date, String fmtDate) {
//
// String strRtn = null;
//
// if (date == null) {
// return "";
// }
//
// if (fmtDate.length() == 0) {
// fmtDate = "yyyy/MM/dd";
// }
//
// Format fmt = new SimpleDateFormat(fmtDate);
// try {
// strRtn = fmt.format(date);
// } catch (Exception e) {
// e.printStackTrace();
// }
// return strRtn;
// }
//
// public static Date str2Date(String dateStr) {
// Date date = new Date();
//
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
// try {
// date = sdf.parse(dateStr);
//
// } catch (Exception e) {
// e.printStackTrace();
// }
// return date;
// }
//
// public static Date str2Date(String dateStr, String fmtDate) {
// Date date = new Date();
// if (fmtDate.length() == 0) {
// fmtDate = "yyyy/MM/dd";
// }
//
// SimpleDateFormat sdf = new SimpleDateFormat(fmtDate);
// try {
// date = sdf.parse(dateStr);
//
// } catch (Exception e) {
// e.printStackTrace();
// }
// return date;
// }
//
// /*
// * public static String dateTime2Str(Date date) { return null; } public
// * static String dateTime2Str(Date date,String fmtDateTime){ return null; }
// * public static Date str2DateTime(String dateStr){ return null; } public
// * static Date str2DateTime(String dateStr,String fmtDateTime){ return null; }
// */
//}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -