?? dodate.java
字號:
package com.laoer.bbscs.txthtml;import java.util.*;import java.text.*;/** * <p>Title: BBS-CS</p> * <p>Description: BBS-CS(BBS式虛擬社區(qū)系統(tǒng))</p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: loveroom.com.cn</p> * @author 龔天乙(laoer) * @version 3.0 */public class DoDate { public DoDate() { } public String fotmatDate1(Date myDate) { SimpleDateFormat formatter = new SimpleDateFormat ("yyyy年MM月dd日 HH時mm分ss秒"); String strDate = formatter.format(myDate); return strDate; } public String fotmatDate2(Date myDate) { SimpleDateFormat formatter = new SimpleDateFormat ("yyyy年MM月dd日"); String strDate = formatter.format(myDate); return strDate; } public String fotmatDate3(Date myDate) { SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss"); String strDate = formatter.format(myDate); return strDate; } public String fotmatDate4(Date myDate) { SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-dd"); String strDate = formatter.format(myDate); return strDate; } public String fotmatDate5(Date myDate) { SimpleDateFormat formatter = new SimpleDateFormat ("yyyy/MM/dd"); String strDate = formatter.format(myDate); return strDate; } public String fotmatDate6(Date myDate) { SimpleDateFormat formatter = new SimpleDateFormat ("MM-dd HH:mm"); String strDate = formatter.format(myDate); return strDate; }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -