本文整理了Java中java.util.GregorianCalendar.after()
方法的一些代码示例,展示了GregorianCalendar.after()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GregorianCalendar.after()
方法的具体详情如下:
包路径:java.util.GregorianCalendar
类名称:GregorianCalendar
方法名:after
GregorianCalendar.after介绍
暂无
代码示例
代码示例来源:origin: stagemonitor/stagemonitor
private void excludeDays(String prefix, StringBuilder sb, GregorianCalendar lastDayToExclude, GregorianCalendar alreadyExcluded) {
for (; alreadyExcluded.after(lastDayToExclude) || alreadyExcluded.equals(lastDayToExclude); alreadyExcluded.add(Calendar.DAY_OF_YEAR, -1)) {
sb.append(",-").append(prefix).append(StringUtils.getLogstashStyleDate(alreadyExcluded.getTimeInMillis()));
}
}
代码示例来源:origin: org.bitbucket.ibencher/ToxGene
public boolean after(Date anotherDate){
return (this.calendar.after(anotherDate.getCalendar()));
}
代码示例来源:origin: MegaMek/mekhq
public boolean checkLoanPayment(GregorianCalendar today) {
return (today.equals(nextPayment) || today.after(nextPayment)) && nPayments > 0;
}
代码示例来源:origin: org.openl/org.openl.commons
private static Integer getDateDiff(int calUnit, Date endDate, Date startDate) {
if (endDate == null || startDate == null) {
return null;
}
// swap if startDate later than endDate
boolean neg = false;
if (startDate.after(endDate)) {
Date temp = startDate;
startDate = endDate;
endDate = temp;
neg = true;
}
// estimate the diff. startDate is now guaranteed <= endDate
int estimate = (int) getEstDiff(calUnit, startDate, endDate);
// convert the Dates to GregorianCalendars
GregorianCalendar calendarStartDate = new GregorianCalendar();
calendarStartDate.setTime(startDate);
GregorianCalendar calendarEndDate = new GregorianCalendar();
calendarEndDate.setTime(endDate);
// add 2 units less than the estimate to 1st date,
// then serially add units till we exceed 2nd date
calendarStartDate.add(calUnit, (int) estimate - 2);
for (int i = estimate - 1;; i++) {
calendarStartDate.add(calUnit, 1);
if (calendarStartDate.after(calendarEndDate))
return neg ? 1 - i : i - 1;
}
}
代码示例来源:origin: apps4av/avare
GregorianCalendar now2 = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
now2.set(year, Calendar.JANUARY, firstdate, 9, 0, 0);
if (now2.after(now)) {
cycle++;
epoch.add(Calendar.DAY_OF_MONTH, 28);
if(!epoch.after(now)) {
while(true) {
epoch.add(Calendar.DAY_OF_MONTH, 28);
cycle++;
if(epoch.after(now)) {
break;
代码示例来源:origin: apps4av/avare
if(now.after(expires)) {
return true;
代码示例来源:origin: de.sciss/prefuse-core
for( int i=est-inc; ; i+=inc ) {
gc1.add(f, inc);
if( gc1.after(gc2) ) {
return negative ? inc-i : i-inc;
代码示例来源:origin: wlfcolin/file-downloader
/**
* get DetectUrlFile by url
*
* @param url file url
* @return DetectUrlFile
*/
public DetectUrlFileInfo getDetectUrlFile(String url) {
DetectUrlFileInfo detectUrlFileInfo = mDetectUrlFileInfoMap.get(url);
// check and remove
if (DownloadFileUtil.isLegal(detectUrlFileInfo)) {
String createDatetime = detectUrlFileInfo.getCreateDatetime();
if (!TextUtils.isEmpty(detectUrlFileInfo.getCreateDatetime())) {
// check whether is longer than 24 hours(one day)
Date createDate = DateUtil.string2Date_yyyy_MM_dd_HH_mm_ss(createDatetime);
if (createDate != null) {
GregorianCalendar createDateCalendar = new GregorianCalendar();
createDateCalendar.setTime(createDate);
GregorianCalendar curDateCalendar = new GregorianCalendar();
curDateCalendar.setTime(new Date());
createDateCalendar.add(Calendar.DAY_OF_YEAR, 1);// one day, 24 hours
if (curDateCalendar.after(createDateCalendar)) {
// remove the cache
removeDetectUrlFile(detectUrlFileInfo.getUrl());
detectUrlFileInfo = null;
}
}
}
}
return detectUrlFileInfo;
}
代码示例来源:origin: jenkinsci/performance-plugin
if (firstDate != null && lastDate != null && firstDate.after(lastDate)) {
listErrors.add(2);
listErrors.add(3);
代码示例来源:origin: slartus/4pdaClient-plus
if (calendar.after(lastDateTime)) {
setLastDateTime(calendar);
return true;
if (calendar.after(lastDateTime)) {
if (calendar.after(lastDateTime)) {
setLastDateTime(calendar);
return true;
代码示例来源:origin: org.codehaus.openxma/epclient
DateUtil.resetTime (min);
min.add(Calendar.DATE, min_);
if (min.after (today)) {
throw new FmtParseException ("ADateMin", gCalAsString (min));
min.setTime(minDate_);
DateUtil.resetTime(min);
if (min.after (today)) {
throw new FmtParseException ("ADateMin", gCalAsString (min));
代码示例来源:origin: dolphin-dev/OpenDolphin
while (gc1.after(gc2)) {
gc1.add(GregorianCalendar.MONTH, -1);
month--;
代码示例来源:origin: MegaMek/mekhq
if (lastMonth.after(s.getDate())) {
continue;
代码示例来源:origin: OpenAttestation/OpenAttestation
continue;
if (selection.getNotAfter() != null && today.after(selection.getNotAfter().toGregorianCalendar())) {
log.debug("skipping selection because of notAfter date {}", selection.getNotAfter().toString());
continue;
continue;
if (selection.getNotAfter() != null && today.after(selection.getNotAfter().toGregorianCalendar())) {
log.debug("skipping default selection because of notAfter date {}", selection.getNotAfter().toString());
continue;
代码示例来源:origin: org.onap.aaf.cadi/cadi-aaf
renew.setTime(cert.getNotAfter());
renew.add(GregorianCalendar.DAY_OF_MONTH,-1*a.getRenewDays());
if(renew.after(now)) {
msg = String.format("X509Certificate for %s on %s has been checked on %s. It expires on %s; it will not be renewed until %s.\n",
a.getMechid(), a.getMachine(),Chrono.dateOnlyStamp(now),cert.getNotAfter(),Chrono.dateOnlyStamp(renew));
代码示例来源:origin: com.att.cadi/cadi-aaf
renew.setTime(cert.getNotAfter());
renew.add(GregorianCalendar.DAY_OF_MONTH,-1*a.getRenewDays());
if(renew.after(now)) {
msg = String.format("X509Certificate for %s on %s has been checked on %s. It expires on %s; it will not be renewed until %s.\n",
a.getMechid(), a.getMachine(),Chrono.dateOnlyStamp(now),cert.getNotAfter(),Chrono.dateOnlyStamp(renew));
代码示例来源:origin: GluuFederation/oxAuth
if (authenticationMaxAge != null) {
userAuthenticationTime.add(Calendar.SECOND, authenticationMaxAge);
validAuthenticatiOnMaxAge= userAuthenticationTime.after(now);
} else if (client.getDefaultMaxAge() != null) {
userAuthenticationTime.add(Calendar.SECOND, client.getDefaultMaxAge());
validAuthenticatiOnMaxAge= userAuthenticationTime.after(now);
代码示例来源:origin: MegaMek/mekhq
p = c.newPerson(Person.T_DOCTOR);
} else if (roll == 3) { // ASF or Proto Pilot
if (c.getFaction().isClan() && c.getCalendar().after(new GregorianCalendar(3059, 1, 1)) && Compute.d6(2) <6) {
p = c.newPerson(Person.T_PROTO_PILOT);
} else {
代码示例来源:origin: franzinc/agraph-java-client
end = FullDateRange.getRandom();
if (start.after(end)) {
GregorianCalendar swap = end;
end = start;
代码示例来源:origin: franzinc/agraph-java-client
end = FullDateRange.getRandom();
if (start.after(end)) {
GregorianCalendar swap = end;
end = start;