12345678910111213141516171819202122232425262728 |
- package cn.minbb.evaluation.util;
- import java.text.SimpleDateFormat;
- import java.util.Date;
- public class App {
- // 时间格式
- private static SimpleDateFormat simpleDateFormat = (SimpleDateFormat) SimpleDateFormat.getDateTimeInstance();
- private App() {
- }
- private static final App app = new App();
- public static App getInstance() {
- return app;
- }
- // 获取系统当前时间
- public static String getCurrentStringTime() {
- return simpleDateFormat.format(getCurrentDateTime());
- }
- public static Date getCurrentDateTime() {
- return new Date();
- }
- }
|