热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

java.util.GregorianCalendar.after()方法的使用及代码示例

本文整理了Java中java.util.GregorianCalendar.after()方法的一些代码示例,展示了GregorianCalendar.af

本文整理了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;

推荐阅读
  • 最近学习了数据挖掘常用的两种算法:FP-Growth和K-Means。现在把我的学习结果分享给大家。以下是本文的目录,大家可以根据需要跳过一些章节:1.FP-Grow ... [详细]
  • 本文整理了Java中javax.swing.Action.addPropertyChangeListener()方法的一些代码示例,展示了Action.ad ... [详细]
  • ForesightNews整理了ETHDenver2023日程及其周边活动供读者参考。 整理: ... [详细]
  • 搜索+剪枝 POJ 1416 Shredding Company
    POJ1416ShreddingCompanyTimeLimit: 1000MSMemoryLimit: 10000KTotalSubmissions: 5231Accepted: ... [详细]
  • Iamtryingtomakeaclassthatwillreadatextfileofnamesintoanarray,thenreturnthatarra ... [详细]
  • Linux重启网络命令实例及关机和重启示例教程
    本文介绍了Linux系统中重启网络命令的实例,以及使用不同方式关机和重启系统的示例教程。包括使用图形界面和控制台访问系统的方法,以及使用shutdown命令进行系统关机和重启的句法和用法。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • This article discusses the efficiency of using char str[] and char *str and whether there is any reason to prefer one over the other. It explains the difference between the two and provides an example to illustrate their usage. ... [详细]
  • 在ROS系统中,参数读写一般通过xml或者yaml格式的文件,其中yaml用得比较多。这是一种可读性高,轻量级的标记语言,简单好用。对于yaml文件,ros中用的较早版本的yaml- ... [详细]
  • IOSUITableView解析(一)
    UITableView的作用由于Iphone的大小有限,所以UITableView的作用是巨大的。比如QQ,微博等应用都用到了该控件。UITableVi ... [详细]
  • 问题说明最近看到Spring事务,在学习过程中遇到一个很苦恼问题搭建好Spring的启动环境后出现了一点小问题在启动时候却出现[java.lang.NullPointerExcep ... [详细]
  • IamusingmaterialDateTimepickerformyAndroidapp.ButIwanttocombinetheDateandTimepic ... [详细]
  • 本文详细介绍了git常用命令及其操作方法,包括查看、添加、提交、删除、找回等操作,以及如何重置修改文件、抛弃工作区修改、将工作文件提交到本地暂存区、从版本库中删除文件等。同时还介绍了如何从暂存区恢复到工作文件、恢复最近一次提交过的状态,以及如何合并多个操作等。 ... [详细]
  • 本文讨论了在使用Git进行版本控制时,如何提供类似CVS中自动增加版本号的功能。作者介绍了Git中的其他版本表示方式,如git describe命令,并提供了使用这些表示方式来确定文件更新情况的示例。此外,文章还介绍了启用$Id:$功能的方法,并讨论了一些开发者在使用Git时的需求和使用场景。 ... [详细]
  • Python中的PyInputPlus模块原文:https ... [详细]
author-avatar
手机用户2702932962_848
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有