public class DataFormatUtil extends Object
| Constructor and Description |
|---|
DataFormatUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
dateFormat(Date date,
String pattern)
日期格式化
|
static String |
dateFormat(long dateTime,
String pattern)
日期格式化
|
static String |
getSystemDate()
获取当前日期
|
static String |
getSystemTime()
获取当前时间
|
static double |
numPrecisionFormat(double num,
int precision)
数值格式化,精度截取
|
public static double numPrecisionFormat(double num,
int precision)
num - precision - public static String dateFormat(Date date, String pattern)
date - pattern - 输出格式,例如 yyyy-MM-ddpublic static String dateFormat(long dateTime, String pattern)
dateTime - pattern - 输出格式,例如 yyyy-MM-ddpublic static String getSystemDate()
public static String getSystemTime()
Copyright © 2006–2018 TinyGroup. All rights reserved.