本文整理汇总了Java中org.joda.time.DateMidnight.isBeforeNow方法的典型用法代码示例。如果您正苦于以下问题:Java DateMidnight.isBeforeNow方法的具体用法?Java DateMidnight.isBeforeNow怎么用?Java DateMidnight.isBeforeNow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.joda.time.DateMidnight
的用法示例。
在下文中一共展示了DateMidnight.isBeforeNow方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isLongWaitingApplications
import org.joda.time.DateMidnight; //导入方法依赖的package包/类
private Predicate<Application> isLongWaitingApplications() {
return application -> {
DateMidnight remindDate = application.getRemindDate();
if (remindDate == null) {
Integer daysBeforeRemindForWaitingApplications =
settingsService.getSettings().getAbsenceSettings().getDaysBeforeRemindForWaitingApplications();
// never reminded before
DateMidnight minDateForNotification = application.getApplicationDate()
.plusDays(daysBeforeRemindForWaitingApplications);
// true -> remind!
// false -> to early for notification
return minDateForNotification.isBeforeNow();
} else {
// true -> not reminded today
// false -> already reminded today
return !remindDate.isEqual(DateMidnight.now());
}
};
}
示例2: getResponseWeek
import org.joda.time.DateMidnight; //导入方法依赖的package包/类
public Interval getResponseWeek() {
final DateMidnight beginningOfSemester = new DateMidnight(getBegginingOfLessonPeriod());
final DateMidnight firstMonday = beginningOfSemester.withField(DateTimeFieldType.dayOfWeek(), 1);
final DateMidnight secondMonday = firstMonday.plusWeeks(1);
final DateMidnight endOfSemester = new DateMidnight(getEndOfExamsPeriod());
final DateMidnight lastMonday = endOfSemester.withField(DateTimeFieldType.dayOfWeek(), 1);
final DateMidnight endOfResponsePeriod = lastMonday.plusWeeks(2);
return (secondMonday.isEqualNow() || secondMonday.isBeforeNow()) && endOfResponsePeriod.isAfterNow() ? getPreviousWeek() : null;
}
示例3: scoresPerDay
import org.joda.time.DateMidnight; //导入方法依赖的package包/类
public static String scoresPerDay() {
List<String> scores = new ArrayList<String>();
DateMidnight dt = new DateMidnight(2013, 11, 29);
while (dt.isBeforeNow()) {
int createdAt = Ebean.
createQuery(Score.class).
where(le("createdAt", dt.plusDays(1).toDate())).
findRowCount();
scores.add(((double) createdAt) + "");
dt = dt.plusMonths(1);
}
return Joiner.on(",").join(scores);
}