本文整理了Java中org.joda.time.LocalTime.isBefore()
方法的一些代码示例,展示了LocalTime.isBefore()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalTime.isBefore()
方法的具体详情如下:
包路径:org.joda.time.LocalTime
类名称:LocalTime
方法名:isBefore
暂无
代码示例来源:origin: org.kuali.kpme/kpme-tk-lm-impl
/**
* Check to see if the first week is Full or not.
*
* If the first week of a pay period has an FLSA starting time that is before
* the "Virtual Day" pay period start time, part of the time required for this
* first day will be in the previous pay period even if we have 7 days.
*
* @return
*/
public boolean isFirstWeekFull() {
if (flsaDays.size() == 7) {
return (flsaTime.isBefore(payPeriodBeginTime)) ? false : true;
} else {
return false;
}
}
代码示例来源:origin: qcadoo/mes
private Function<TimeRange, Boolean> endsNextDay(final LocalTime orderStartTime) {
return timeRange -> timeRange.startsDayBefore() && !orderStartTime.isBefore(timeRange.getFrom());
}
代码示例来源:origin: FenixEdu/fenixedu-academic
public static boolean isEvalBetweenDates(final WrittenEvaluation eval, final LocalTime begin, final LocalTime end) {
final HourMinuteSecond bhms = eval.getBeginningDateHourMinuteSecond();
final HourMinuteSecond ehms = eval.getEndDateHourMinuteSecond();
return bhms.toLocalTime().isBefore(end) && ehms.toLocalTime().isAfter(begin);
}
代码示例来源:origin: eryk/JQuant
/**
* 判断当前时间是否是交易时间段
* 周一到周五
* 上午:09:30-11:30
* 下午:13:00-15:00
* @return if now is trading time,return true, else return false
*/
public static boolean isTradingTime(){
DateTime dateTime = new DateTime();
if(dateTime.dayOfWeek().get()>=1 && dateTime.getDayOfWeek()<=5){
LocalTime now = dateTime.toLocalTime();
LocalTime start = new LocalTime(9,30,0,0);
LocalTime mid1 = new LocalTime(11,30,0,0);
LocalTime mid2 = new LocalTime(13,0,0,0);
LocalTime end = new LocalTime(15,0,0,0);
if((now.isAfter(start) && now.isBefore(mid1))||(now.isAfter(mid2) && now.isBefore(end))){
return true;
}
}
return false;
}
代码示例来源:origin: eryk/JQuant
/**
* 判断当前时间是否是交易时间段
* 周一到周五
* 上午:09:30-11:30
* 下午:13:00-14:45
* @return if now is trading time,return true, else return false
*/
public static boolean isNearTradingTime(){
DateTime dateTime = new DateTime();
if(dateTime.dayOfWeek().get()>=1 && dateTime.getDayOfWeek()<=5){
LocalTime now = dateTime.toLocalTime();
LocalTime start = new LocalTime(9,30,0,0);
LocalTime mid1 = new LocalTime(11,30,0,0);
LocalTime mid2 = new LocalTime(13,0,0,0);
LocalTime end = new LocalTime(14,45,0,0);
if((now.isAfter(start) && now.isBefore(mid1))||(now.isAfter(mid2) && now.isBefore(end))){
return true;
}
}
return false;
}
代码示例来源:origin: Jasig/uPortal
if (nextTime.isBefore(dimensionTime)) {
do {
checkShutdown();
this.timeDimensionDao.createTimeDimension(nextTime);
nextTime = nextTime.plusMinutes(1);
} while (nextTime.isBefore(dimensionTime));
} else if (nextTime.isAfter(dimensionTime)) {
do {
while (nextTime.isBefore(lastTime) || nextTime.equals(lastTime)) {
checkShutdown();
this.timeDimensionDao.createTimeDimension(nextTime);
代码示例来源:origin: qcadoo/mes
private DateRange buildDateRangeFrom(final TimeRange timeRange, final Date date) {
DateTime dateTime = new DateTime(date);
DateTime midnight = dateTime.withTimeAtStartOfDay();
DateTime from;
DateTime to;
if (timeRange.startsDayBefore()) {
if (dateTime.toLocalTime().isBefore(timeRange.getFrom())) {
from = timeRange.getFrom().toDateTime(midnight.minusDays(1));
to = timeRange.getTo().toDateTime(midnight);
} else {
from = timeRange.getFrom().toDateTime(midnight);
to = timeRange.getTo().toDateTime(midnight.plusDays(1));
}
} else {
from = timeRange.getFrom().toDateTime(midnight);
to = timeRange.getTo().toDateTime(midnight);
}
return new DateRange(from.toDate(), to.toDate());
}
代码示例来源:origin: org.eobjects.analyzerbeans/AnalyzerBeans-basic-analyzers
_maxTime = localTime;
_annotationFactory.reset(_maxTimeAnnotation);
} else if (localTime.isBefore(_minTime)) {
_minTime = localTime;
_annotationFactory.reset(_minTimeAnnotation);
代码示例来源:origin: datacleaner/DataCleaner
_maxTime = localTime;
_annotationFactory.resetAnnotation(_maxTimeAnnotation);
} else if (localTime.isBefore(_minTime)) {
_minTime = localTime;
_annotationFactory.resetAnnotation(_minTimeAnnotation);
内容来源于网络,如有侵权,请联系作者删除!