本文整理匯總了Java中org.joda.time.DateTime.getMillisOfSecond方法的典型用法代碼示例。如果您正苦於以下問題:Java DateTime.getMillisOfSecond方法的具體用法?Java DateTime.getMillisOfSecond怎麽用?Java DateTime.getMillisOfSecond使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.joda.time.DateTime
的用法示例。
在下文中一共展示了DateTime.getMillisOfSecond方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ICalendarMeeting
import org.joda.time.DateTime; //導入方法依賴的package包/類
public ICalendarMeeting(MeetingInterface meeting, Status status) {
if (meeting.getStartTime() != null) {
iStart = new DateTime(meeting.getStartTime());
} else {
iStart = new DateTime(meeting.getMeetingDate()).plusMinutes((5 * meeting.getStartSlot()) + meeting.getStartOffset());
}
if (meeting.getStartTime() != null) {
iEnd = new DateTime(meeting.getStopTime());
} else {
iEnd = new DateTime(meeting.getMeetingDate()).plusMinutes((5 * meeting.getEndSlot()) + meeting.getEndOffset());
}
if (iStart.getSecondOfMinute() != 0) iStart = iStart.minusSeconds(iStart.getSecondOfMinute());
if (iEnd.getSecondOfMinute() != 0) iEnd = iEnd.minusSeconds(iEnd.getSecondOfMinute());
if (iStart.getMillisOfSecond() != 0) iStart = iStart.minusMillis(iStart.getMillisOfSecond());
if (iEnd.getMillisOfSecond() != 0) iEnd = iEnd.minusMillis(iEnd.getMillisOfSecond());
iLocation = meeting.getLocationName(MESSAGES);
iStatus = (status != null ? status : meeting.isApproved() ? Status.confirmed() : Status.tentative());
}
示例2: getMicroSecond
import org.joda.time.DateTime; //導入方法依賴的package包/類
/**
* 獲取date對象毫秒數
* @param date
* @return
*/
public static int getMicroSecond(Date date) {
DateTime dt = new DateTime(date);
return dt.getMillisOfSecond();
}
示例3: getMicroSecond
import org.joda.time.DateTime; //導入方法依賴的package包/類
/**
* getMicroSecond
*
* @param date
* @return
*/
public static int getMicroSecond(Date date) {
DateTime dt = new DateTime(date);
return dt.getMillisOfSecond();
}