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


Java DateUtils.addMinutes方法代碼示例

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


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

示例1: subMinutes

import org.apache.commons.lang3.time.DateUtils; //導入方法依賴的package包/類
/**
 * 減一分鍾
 */
public static Date subMinutes(@NotNull final Date date, int amount) {
	return DateUtils.addMinutes(date, -amount);
}
 
開發者ID:zhangjunfang,項目名稱:util,代碼行數:7,代碼來源:DateUtil.java

示例2: addMinutes

import org.apache.commons.lang3.time.DateUtils; //導入方法依賴的package包/類
/**
 * 加一分鍾
 */
public static Date addMinutes(@NotNull final Date date, int amount) {
	return DateUtils.addMinutes(date, amount);
}
 
開發者ID:zhangjunfang,項目名稱:util,代碼行數:7,代碼來源:DateUtil.java

示例3: attendFailCauseRegistNotOpen

import org.apache.commons.lang3.time.DateUtils; //導入方法依賴的package包/類
@Test(expected = HttpClientErrorException.class)
@Transactional
public void attendFailCauseRegistNotOpen() {
	Meeting meeting = meetingService.findById(user1MeetingId).get();
	meeting.setMeetingStatus(Meeting.MeetingStatus.PUBLISHED);
	Date minPlusOpenTime = DateUtils.addMinutes(Date.from(ZonedDateTime.now(ZoneOffset.UTC).toInstant()), 10);
	meeting.setRegistOpenAt(minPlusOpenTime);

	meetingAttendService.attend(meeting, baseDataTestHelper.getUser2());
}
 
開發者ID:spring-sprout,項目名稱:osoon,代碼行數:11,代碼來源:MeetingAttendServiceTest.java

示例4: attendFailCauseRegistClose

import org.apache.commons.lang3.time.DateUtils; //導入方法依賴的package包/類
@Test(expected = HttpClientErrorException.class)
@Transactional
public void attendFailCauseRegistClose() {
	Meeting meeting = meetingService.findById(user1MeetingId).get();
	meeting.setMeetingStatus(Meeting.MeetingStatus.PUBLISHED);
	Date minPlusOpenTime = DateUtils.addMinutes(Date.from(ZonedDateTime.now(ZoneOffset.UTC).toInstant()), -10);
	meeting.setRegistCloseAt(minPlusOpenTime);

	meetingAttendService.attend(meeting, baseDataTestHelper.getUser2());
}
 
開發者ID:spring-sprout,項目名稱:osoon,代碼行數:11,代碼來源:MeetingAttendServiceTest.java

示例5: getDateRange

import org.apache.commons.lang3.time.DateUtils; //導入方法依賴的package包/類
private Range<Date> getDateRange() {
    Date endDate = DateUtils.truncate(new Date(), Calendar.MINUTE);
    Date startDate = DateUtils.addMinutes(endDate,
            -YiDuConstants.yiduConf.getInt(YiDuConfig.SEND_SUBSCRIBE_INTEVAL, 15));
    return Range.between(startDate, endDate);
}
 
開發者ID:luckyyeah,項目名稱:YiDu-Novel,代碼行數:7,代碼來源:SendSubscribeMailJob.java


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