限定符和类型 | 方法和说明 |
---|---|
TuSdkDate |
addDay(int value)
添加天数
|
TuSdkDate |
addMonth(int value)
添加月份
|
TuSdkDate |
associateDayOfTheFollowingMonth()
获取后一个月中与当天对应的日期
|
TuSdkDate |
associateDayOfThePreviousMonth()
获取前一个月中与当天对应的日期
|
TuSdkDate |
beginingOfDay()
获取当天的起始时间(00:00:00)
|
java.util.Calendar |
calendar()
输入时间
|
int |
compareTo(TuSdkDate another) |
static TuSdkDate |
create()
时间日期类
|
static TuSdkDate |
create(java.util.Calendar calendar)
时间日期类
|
static TuSdkDate |
create(long milliseconds)
时间日期类
|
int |
day()
日期 从1开始
|
long |
diffOfMillis()
与当前时间相隔毫秒
|
long |
diffOfMillis(long milliseconds)
两个时间段相隔毫秒
|
long |
diffOfMillis(TuSdkDate date)
两个时间段相隔毫秒
|
int |
diffOfMonth()
与当前相隔月数
|
int |
diffOfMonth(TuSdkDate date)
两个时间段相隔月数
|
TuSdkDate |
endOfDay()
获取当天的结束时间(23:59:59)
|
boolean |
equals(java.lang.Object o) |
TuSdkDate |
firstDayOfTheFollowingMonth()
获取后一个月的第一天
|
TuSdkDate |
firstDayOfTheMonth()
获取当月的第一天
|
TuSdkDate |
firstDayOfThePreviousMonth()
获取前一个月的第一天
|
TuSdkDate |
firstDayOfTheWeek()
获取这一周的第一天
|
TuSdkDate |
followingDay()
后一天
|
java.lang.String |
format(java.lang.String formater)
格式化日期
|
long |
getTimeInMillis()
获取自1970年时间毫秒
|
int |
getTimeInSeconds()
获取自1970年时间秒
|
int |
hour()
小时数
|
boolean |
isInModth()
是否为本月
|
boolean |
isToday()
是否为今天
|
TuSdkDate |
lastDayOfTheMonth()
获取当月的最后一天
|
int |
minute()
分钟数
|
int |
month()
月份 从0开始
|
int |
numberOfDaysInMonth()
获取当月的天数
|
int |
numberOfWeeksInMonth()
获取当月的周数
|
TuSdkDate |
previousDay()
前一天
|
boolean |
sameDay(TuSdkDate date)
判断与某一天是否为同一天
|
boolean |
sameMonth(TuSdkDate date)
判断与某一天是否为同一周
|
boolean |
sameWeek(TuSdkDate date)
判断与某一天是否为同一周
|
int |
second()
秒数
|
void |
test()
测试数据
|
java.lang.String |
toString()
输出
|
int |
week()
周数 从1开始
|
int |
weekday()
星期
SUNDAY = 1 | SATURDAY = 7
|
int |
weekOfDayInMonth()
获取当天是当月的第几周
从1开始
|
int |
year()
年份
|
public TuSdkDate()
public TuSdkDate(java.util.Calendar calendar)
calendar
- public static TuSdkDate create()
public static TuSdkDate create(java.util.Calendar calendar)
calendar
- public static TuSdkDate create(long milliseconds)
calendar
- public java.util.Calendar calendar()
public long getTimeInMillis()
public int getTimeInSeconds()
public int year()
public int month()
public int day()
public int hour()
public int minute()
public int second()
public int weekday()
public int week()
public TuSdkDate addDay(int value)
value
- public TuSdkDate addMonth(int value)
value
- public TuSdkDate beginingOfDay()
public TuSdkDate endOfDay()
public TuSdkDate firstDayOfTheMonth()
public TuSdkDate lastDayOfTheMonth()
public TuSdkDate firstDayOfThePreviousMonth()
public TuSdkDate firstDayOfTheFollowingMonth()
public TuSdkDate associateDayOfThePreviousMonth()
public TuSdkDate associateDayOfTheFollowingMonth()
public int numberOfDaysInMonth()
public int numberOfWeeksInMonth()
public TuSdkDate firstDayOfTheWeek()
public int weekOfDayInMonth()
public TuSdkDate previousDay()
public TuSdkDate followingDay()
public boolean isToday()
public boolean isInModth()
public boolean sameDay(TuSdkDate date)
date
- public boolean sameWeek(TuSdkDate date)
date
- public boolean sameMonth(TuSdkDate date)
date
- public int diffOfMonth()
public int diffOfMonth(TuSdkDate date)
public long diffOfMillis()
public long diffOfMillis(TuSdkDate date)
date
- public long diffOfMillis(long milliseconds)
milliseconds
- public boolean equals(java.lang.Object o)
equals
在类中 java.lang.Object
public int compareTo(TuSdkDate another)
compareTo
在接口中 java.lang.Comparable<TuSdkDate>
public java.lang.String toString()
toString
在类中 java.lang.Object
public java.lang.String format(java.lang.String formater)
formater
- public void test()