public final class DateTools extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
DateTools.FmtDate |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
format()
format yyyy-MM-dd HH:mm:ss
|
String |
format(String format)
format by format
|
String |
getDate()
Get yyyy-MM-dd
|
String |
getDateTime()
Get yyyy-MM-dd HH:mm:ss
|
long |
getMillis()
Get long date
|
static String[] |
getPatterns() |
String |
getTime()
Get HH:mm:ss
|
boolean |
isAfter(Date date) |
boolean |
isAfter(String date) |
boolean |
isAfterNow() |
boolean |
isBefore(Date date) |
boolean |
isBefore(String date) |
boolean |
isBeforeNow() |
static DateTools |
now()
now date
|
static DateTools |
of(Date date) |
static DateTools |
of(long date) |
static DateTools |
of(String date) |
Calendar |
toCalendar()
To java.util.Calendar
|
Date |
toDate()
To java.util.Date
|
org.joda.time.DateTime |
toJoda()
To org.joda.time.DateTime
|
public static String[] getPatterns()
public static DateTools now()
public static DateTools of(long date)
date - long datepublic Date toDate()
public Calendar toCalendar()
public org.joda.time.DateTime toJoda()
public String getDate()
public String getTime()
public String getDateTime()
public long getMillis()
public String format()
public boolean isAfterNow()
public boolean isAfter(String date)
public boolean isAfter(Date date)
public boolean isBeforeNow()
public boolean isBefore(String date)
public boolean isBefore(Date date)
Copyright © 2016. All rights reserved.