public class DateUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
YYYY_MM_DD
各种时间格式
|
static String |
YYYY_MM_DD_HHMMSSSSS |
static String |
YYYY_MM_DDHHMM |
static String |
YYYY_MM_DDHHMMSS |
static String |
YYYYMMDD |
static String |
YYYYMMDDHHMMSS |
static String |
YYYYMMDDHHMMSS_CHINA |
static String |
YYYYMMDDHHMMSSSSS |
| 限定符和类型 | 方法和说明 |
|---|---|
static org.joda.time.Days |
daysToNewYear(org.joda.time.LocalDate fromDate)
新的一年
|
static Date |
endOfDay()
当天结束时间 23:59:59
|
static LocalDateTime |
getDateTimeOfTimestamp(long timestamp)
timestamp转成LocalDateTime
|
static String |
nextYear(String format)
明年
|
static Date |
now()
获取日期
|
static String |
now(org.joda.time.DateTime dateTime,
String format)
获取当前时间
|
static String |
now(String format)
获取当前时间
|
static Date |
startOfDay()
当天凌晨 00:00:00
|
static String |
tomorrow(String format)
明天
|
public static org.joda.time.Days daysToNewYear(org.joda.time.LocalDate fromDate)
fromDate - public static String now(org.joda.time.DateTime dateTime, String format)
dateTime - format - public static Date now()
public static Date startOfDay()
public static Date endOfDay()
public static LocalDateTime getDateTimeOfTimestamp(long timestamp)
timestamp - Copyright © 2024. All rights reserved.