Code example for DatatypeFactory

Methods: newDuration

0
      start = parseDate(expression.get(0));
      if (isDuration(expression.get(1))) {
        period = parsePeriod(expression.get(1));
      } else { 
        end = parseDate(expression.get(1));
        period = datatypeFactory.newDuration(end.getTimeInMillis() - start.getTimeInMillis());
      } 
    } 
    if (start == null && end == null) {
      start = clockReader.getCurrentCalendar();
    } 
 
  } 
 
  public Calendar getCalendarAfter() {
    return getCalendarAfter(clockReader.getCurrentCalendar());
  } 
   
  public Calendar getCalendarAfter(Calendar time) {
    if (isRepeat) {
Experience pair programming with AI  Get Codota for Java