当前位置: 首页>>代码示例>>Java>>正文


Java DateMidnight.isBeforeNow方法代码示例

本文整理汇总了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());
        }
    };
}
 
开发者ID:synyx,项目名称:urlaubsverwaltung,代码行数:23,代码来源:CronMailService.java

示例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;
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:12,代码来源:Attends.java

示例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);
}
 
开发者ID:jsmadja,项目名称:shmuphiscores,代码行数:14,代码来源:StatsController.java


注:本文中的org.joda.time.DateMidnight.isBeforeNow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。