本文整理了Java中org.activityinfo.model.type.time.LocalDate.before()
方法的一些代码示例,展示了LocalDate.before()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalDate.before()
方法的具体详情如下:
包路径:org.activityinfo.model.type.time.LocalDate
类名称:LocalDate
方法名:before
暂无
代码示例来源:origin: bedatadriven/activityinfo
/**
* @return true if the {@code other} interval overlaps this interval with at least one day.
*/
public boolean overlaps(LocalDateInterval other) {
// Either the other interval finishes before this interval starts...
// .. or it starts after this interval finishes
return !(other.endDate.before(this.startDate) ||
other.startDate.after(this.endDate));
}
代码示例来源:origin: bedatadriven/activityinfo
static boolean isSnoozed(AccountStatus status, String snoozePrefix) {
try {
Storage storage = Storage.getLocalStorageIfSupported();
if(storage == null) {
return false;
}
String accountSnooze = storage.getItem(snoozePrefix + status.getUserAccountId());
if(accountSnooze == null) {
return false;
}
LocalDate snoozeDate = LocalDate.parse(accountSnooze);
LocalDate today = new LocalDate();
if(today.before(snoozeDate)) {
return true;
} else {
return false;
}
} catch (Exception e) {
return false;
}
}
}
代码示例来源:origin: bedatadriven/activityinfo
public static EpiWeek weekOf(LocalDate date) {
LocalDate firstDayOfYear = dayOfFirstEpiWeek(date.getYear());
if(date.before(firstDayOfYear)) {
return new EpiWeek(date.getYear() - 1, 52);
} else {
int daysBetween = LocalDate.daysBetween(firstDayOfYear, date);
int weekNumber = daysBetween / 7;
return new EpiWeek(date.getYear(), weekNumber + 1);
}
}
代码示例来源:origin: bedatadriven/activityinfo
@Test
public void minDate() {
LocalDate afterMinDate = new LocalDate(2017,01,01);
assertTrue("Should be _after_ minimum date", afterMinDate.after(LocalDate.MIN_DATE));
LocalDate onMinDate = new LocalDate(1000,01,01);
assertTrue("Should be _on_ minimum date", onMinDate.equals(LocalDate.MIN_DATE));
LocalDate beforeMinDate = new LocalDate(99,01,01);
assertTrue("Should be _before_ minimum date", beforeMinDate.before(LocalDate.MIN_DATE));
}
代码示例来源:origin: bedatadriven/activityinfo
db.setSuspended(trialEndDate.before(today));
} else {
db.setBillingAccountName(row.get("baName"));
内容来源于网络,如有侵权,请联系作者删除!