📄 time.java
字号:
package labraryManager;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.*;
import java.text.*;
public class Time {
public static long getCurrentTimeMillis() {
return System.currentTimeMillis();
}
public static Date getCurrentDate() {
// return new Date(System.currentTimeMillis());
return new Date(getCurrentTimeMillis());
}
public static String getCurrentFormatDate() {
Date currentDate = getCurrentDate();
SimpleDateFormat dateFormator = new SimpleDateFormat(
"yyyy-MM-dd");
return dateFormator.format(currentDate);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -