當前位置: 首頁>>代碼示例>>Java>>正文


Java DateTime.getSecondOfMinute方法代碼示例

本文整理匯總了Java中org.joda.time.DateTime.getSecondOfMinute方法的典型用法代碼示例。如果您正苦於以下問題:Java DateTime.getSecondOfMinute方法的具體用法?Java DateTime.getSecondOfMinute怎麽用?Java DateTime.getSecondOfMinute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.joda.time.DateTime的用法示例。


在下文中一共展示了DateTime.getSecondOfMinute方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: generateNewUploadId

import org.joda.time.DateTime; //導入方法依賴的package包/類
/**
 * Creates a new uploadId from the time:
 * format("%d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, seconds);
 * @return
 */
public static String generateNewUploadId() {
    java.util.Date juDate = new Date();
    DateTime dt = new DateTime(juDate);

    StringBuilder sb = new StringBuilder();
    // Send all output to the Appendable object sb
    Formatter formatter = new Formatter(sb);


    int day = dt.getDayOfMonth();
    int month = dt.getMonthOfYear();
    int year = dt.getYear();
    int hour = dt.getHourOfDay();
    int minute = dt.getMinuteOfHour();
    int seconds = dt.getSecondOfMinute();

    formatter.format("%d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, seconds);
    return sb.toString();

}
 
開發者ID:UMM-CSci-3601-S17,項目名稱:digital-display-garden-iteration-4-revolverenguardia-1,代碼行數:26,代碼來源:ExcelParser.java

示例2: 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());
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:19,代碼來源:EventsExportEventsToICal.java

示例3: getAvailableUploadId

import org.joda.time.DateTime; //導入方法依賴的package包/類
public static String getAvailableUploadId(){

        StringBuilder sb = new StringBuilder();
        // Send all output to the Appendable object sb
        Formatter formatter = new Formatter(sb);

        java.util.Date juDate = new Date();
        DateTime dt = new DateTime(juDate);

        int day = dt.getDayOfMonth();
        int month = dt.getMonthOfYear();
        int year = dt.getYear();
        int hour = dt.getHourOfDay();
        int minute = dt.getMinuteOfHour();
        int seconds = dt.getSecondOfMinute();

        formatter.format("%d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, seconds);
        return sb.toString();

    }
 
開發者ID:UMM-CSci-3601-S17,項目名稱:digital-display-garden-iteration-3-sixguysburgers-fries,代碼行數:21,代碼來源:ImageHandler.java

示例4: getAvailableUploadId

import org.joda.time.DateTime; //導入方法依賴的package包/類
public static String getAvailableUploadId(){

        StringBuilder sb = new StringBuilder();
        // Send all output to the Appendable object sb
        Formatter formatter = new Formatter(sb);

        java.util.Date juDate = new Date();
        DateTime dt = new DateTime(juDate);

        int day = dt.getDayOfMonth();
        int month = dt.getMonthOfYear();
        int year = dt.getYear();
        int hour = dt.getHourOfDay();
        int minute = dt.getMinuteOfHour();
        int seconds = dt.getSecondOfMinute();

        formatter.format("%d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, seconds);

        allIds.add(sb.toString());
        return sb.toString();
    }
 
開發者ID:UMM-CSci-3601-S17,項目名稱:digital-display-garden-iteration-3-sixguysburgers-fries,代碼行數:22,代碼來源:ExcelParser.java

示例5: getAvailableUploadID

import org.joda.time.DateTime; //導入方法依賴的package包/類
public static String getAvailableUploadID(){

        StringBuilder sb = new StringBuilder();
        // Send all output to the Appendable object sb
        Formatter formatter = new Formatter(sb);

        java.util.Date juDate = new Date();
        DateTime dt = new DateTime(juDate);

        int day = dt.getDayOfMonth();
        int month = dt.getMonthOfYear();
        int year = dt.getYear();
        int hour = dt.getHourOfDay();
        int minute = dt.getMinuteOfHour();
        int seconds = dt.getSecondOfMinute();

        formatter.format("%d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, seconds);
        return sb.toString();

    }
 
開發者ID:UMM-CSci-3601-S17,項目名稱:digital-display-garden-iteration-4-dorfner-v2,代碼行數:21,代碼來源:ExcelParser.java

示例6: getSecond

import org.joda.time.DateTime; //導入方法依賴的package包/類
/**
 * 獲取date對象秒數
 * @param date
 * @return
 */
public static int getSecond(Date date) {
	DateTime dt = new DateTime(date);
	return dt.getSecondOfMinute();
}
 
開發者ID:huang-up,項目名稱:mycat-src-1.6.1-RELEASE,代碼行數:10,代碼來源:DateUtil.java

示例7: getSecond

import org.joda.time.DateTime; //導入方法依賴的package包/類
/**
 * getSecond
 *
 * @param date
 * @return
 */
public static int getSecond(Date date) {
    DateTime dt = new DateTime(date);
    return dt.getSecondOfMinute();
}
 
開發者ID:actiontech,項目名稱:dble,代碼行數:11,代碼來源:DateUtil.java


注:本文中的org.joda.time.DateTime.getSecondOfMinute方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。