本文整理汇总了Java中net.sf.memoranda.date.CalendarDate.before方法的典型用法代码示例。如果您正苦于以下问题:Java CalendarDate.before方法的具体用法?Java CalendarDate.before怎么用?Java CalendarDate.before使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.date.CalendarDate
的用法示例。
在下文中一共展示了CalendarDate.before方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStatus
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**
* @see net.sf.memoranda.Project#getStatus()
*/
public int getStatus() {
if (isFrozen())
return Project.FROZEN;
CalendarDate today = CurrentDate.get();
CalendarDate prStart = getStartDate();
CalendarDate prEnd = getEndDate();
if (prEnd == null) {
if (today.before(prStart))
return Project.SCHEDULED;
else
return Project.ACTIVE;
}
if (today.inPeriod(prStart, prEnd))
return Project.ACTIVE;
else if (today.after(prEnd)) {
//if (getProgress() == 100)
return Project.COMPLETED;
/*else
return Project.FAILED;*/
}
else
return Project.SCHEDULED;
}
示例2: getEarliestStartDateFromSubTasks
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**
* Looks through the entire sub task tree and corrects any inconsistencies in start dates
*
* @param t
* @return
*/
public CalendarDate getEarliestStartDateFromSubTasks(Task t) {
CalendarDate d = t.getStartDate();
if (hasSubTasks(t.getID())) {
Collection subTasks = getAllSubTasks(t.getID());
for (Iterator iter = subTasks.iterator(); iter.hasNext();) {
Task e = (Task) iter.next();
CalendarDate dd = getEarliestStartDateFromSubTasks(e);
if(dd.before(d)) {
d = dd;
}
}
t.setStartDate(d);
return d;
}
else {
return t.getStartDate();
}
}
示例3: getStatus
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**s
* @see net.sf.memoranda.Task#getStatus()
*/
public int getStatus(CalendarDate date) {
CalendarDate start = getStartDate();
CalendarDate end = getEndDate();
if (isFrozen())
return Task.FROZEN;
if (isCompleted())
return Task.COMPLETED;
if (date.inPeriod(start, end)) {
if (date.equals(end))
return Task.DEADLINE;
else
return Task.ACTIVE;
}
else if(date.before(start)) {
return Task.SCHEDULED;
}
if(start.after(end)) {
return Task.ACTIVE;
}
return Task.FAILED;
}
示例4: getStatus
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**
* @see net.sf.memoranda.Task#getStatus(CalendarDate)
*/
public int getStatus(CalendarDate date) {
CalendarDate start = getStartDate();
CalendarDate end = getEndDate();
if (isFrozen())
return Task.FROZEN;
if (isCompleted())
return Task.COMPLETED;
if (date.inPeriod(start, end)) {
if (date.equals(end))
return Task.DEADLINE;
else
return Task.ACTIVE;
}
else if(date.before(start)) {
return Task.SCHEDULED;
}
if(start.after(end)) {
return Task.ACTIVE;
}
return Task.FAILED;
}
示例5: getStatus
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**
* @see net.sf.memoranda.Project#getStatus()
*/
public int getStatus() {
if (isFrozen())
return Project.FROZEN;
CalendarDate today = CurrentDate.get();
CalendarDate prStart = getStartDate();
CalendarDate prEnd = getEndDate();
if (prEnd == null) {
if (today.before(prStart))
return Project.SCHEDULED;
else
return Project.ACTIVE;
}
if (today.inPeriod(prStart, prEnd))
return Project.ACTIVE;
else if (today.after(prEnd)) {
//if (getProgress() == 100)
return Project.OVERDUE;
/*else
return Project.FAILED;*/
}
else
return Project.SCHEDULED;
}
示例6: getStatus
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**s
* @see net.sf.memoranda.Task#getStatus()
*/
public int getStatus(CalendarDate date) {
CalendarDate start = getStartDate();
CalendarDate end = getEndDate();
if (isFrozen())
return Task.FROZEN;
if (isCompleted())
return Task.COMPLETED;
if (CalendarDate.today().inPeriod(start, end)) {
if (CalendarDate.today().equals(end))
return Task.DEADLINE;
else
return Task.ACTIVE;
}
else if(date.before(start)) {
return Task.SCHEDULED;
}
if(start.after(end)) {
return Task.ACTIVE;
}
return Task.OVERDUE;
}
示例7: getStatus
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**
* @see net.sf.memoranda.Project#getStatus()
*/
public int getStatus() {
if (isFrozen())
return Project.FROZEN;
CalendarDate today = CurrentDate.get();
CalendarDate prStart = getStartDate();
CalendarDate prEnd = getEndDate();
if (prEnd == null) {
if (today.before(prStart))
return Project.SCHEDULED;
else
return Project.ACTIVE;
}
if (today.inPeriod(prStart, prEnd))
return Project.ACTIVE;
else if (today.after(prEnd)) {
//if (getProgress() == 100)
return Project.COMPLETED;
/*else
return Project.FAILED;*/
}
else
return Project.SCHEDULED;
}