Examples of MutableInterval


Examples of com.facebook.presto.jdbc.internal.joda.time.MutableInterval

            iStartMillis = input.getStartMillis();
            iEndMillis = input.getEndMillis();
        } else if (this instanceof ReadWritableInterval) {
            converter.setInto((ReadWritableInterval) this, interval, chrono);
        } else {
            MutableInterval mi = new MutableInterval();
            converter.setInto(mi, interval, chrono);
            iChronology = mi.getChronology();
            iStartMillis = mi.getStartMillis();
            iEndMillis = mi.getEndMillis();
        }
        checkInterval(iStartMillis, iEndMillis);
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.joda.time.MutableInterval

     * This will always return a new <code>MutableInterval</code> with the same interval.
     *
     * @return the time interval as a MutableInterval object
     */
    public MutableInterval toMutableInterval() {
        return new MutableInterval(getStartMillis(), getEndMillis(), getChronology());
    }
View Full Code Here

Examples of com.projity.pm.time.MutableInterval

  private transient static BarClosure barClosureInstance = new BarClosure();

  public void consumeIntervals(IntervalConsumer consumer) {
    barClosureInstance.initialize(consumer,this);
    boolean inProgress = getPercentComplete() > 0.0D;
    MutableInterval bounds = null;
    if (inProgress) {
      bounds = new MutableInterval(getStart(),getStop());
      barClosureInstance.setBounds(bounds);
    }
    forEachWorkingInterval(barClosureInstance,true,getEffectiveWorkCalendar());
    if (inProgress) {
//      barClosureInstance.initCount();
      bounds.setStart(bounds.getEnd()); // shift for second half
      bounds.setEnd(getEnd());

      forEachWorkingInterval(barClosureInstance,true,getEffectiveWorkCalendar());
    }
    barClosureInstance.setBounds(null);
  }
View Full Code Here

Examples of org.goda.time.MutableInterval

     */
    public void testParse_String() {
        System.out.println("parse");
        Options o = new Options();
        o.setDebug(true);
        MutableInterval expResult = null;
        MutableInterval result = Chronic.parse("this tuesday 5:00", o);
        System.out.println(result);
        result = Chronic.parse("1979-05-27", o);
        System.out.println(result);

        result = Chronic.parse("Aug 23, 2010", o);
        System.out.println(result);

        result = Chronic.parse("1st monday in sept", o);
        System.out.println(result);

        result = Chronic.parse("september 4th", o);
        System.out.println(result);

        result = Chronic.parse("1st of september", o);
        System.out.println(result);

        result = Chronic.parse("three hundred twenty-one and a half days ago", o);
        System.out.println(result);

        o = new Options();
        o.setDebug(true);
       
         System.out.println("1.25 hr ago");
        result = Chronic.parse("1.25 hr ago", o);
        System.out.println(new Date(result.getStartMillis()));
       
       
        System.out.println("17:50");
        result = Chronic.parse("17:50", o);
        System.out.println(new Date(result.getStartMillis()));
       
        System.out.println("3 am");
        result = Chronic.parse("3 am", o);
        System.out.println(result.getStart());
       
      
       
        System.out.println("3a");
        result = Chronic.parse("3a", o);
        System.out.println(new Date(result.getStartMillis()));
       
        System.out.println("10021974");
        result = Chronic.parse("10021974", o);
        System.out.println(result.getStart());
       
       
        System.out.println("023");
        result = Chronic.parse("023", o);
        System.out.println(result.getStart());
       
        System.out.println("1630");
        result = Chronic.parse("1630", o);
        System.out.println(result.getStart());
       
        System.out.println("16:50 10/2/1974");
        result = Chronic.parse("16:50 10/2/1974 ", o);
        System.out.println(result.getStart());
       
       
        System.out.println("16:50 10021974");
        result = Chronic.parse("16:50 10021974 ", o);
        System.out.println(result.getStart());
       
       
       
        System.out.println("10:00am");
        result = Chronic.parse("10:00am");
        System.out.println(result.getStart());
       
       
        System.out.println("10:00a 9/23/2011");
        result = Chronic.parse("10:00a 9/23/2011");
        System.out.println(result.getStart());
   
        System.out.println("sept 11 2001");
        result = Chronic.parse("sept 11 2001");
        System.out.println(result.getStart());
       
       
       
       
        System.out.println("10:00am sept 11 2001");
        result = Chronic.parse("10:00am sept 11 2001");
        System.out.println(result.getStart());
   
    }
View Full Code Here

Examples of org.goda.time.MutableInterval

     */
    public void xtestParse_String_Options() {
        System.out.println("parse");
        String text = "";
        Options options = null;
        MutableInterval expResult = null;
        MutableInterval result = Chronic.parse(text, options);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }
View Full Code Here

Examples of org.goda.time.MutableInterval

        if (options.isDebug()) {
            System.out.println("Chronic.parse: " + tokens);
        }

        MutableInterval MutableInterval = Handler.tokensToMutableInterval(tokens, options);

        // guess a time within a MutableInterval if required
        if (options.isGuess()) {
            MutableInterval = guess(MutableInterval);
        }
View Full Code Here

Examples of org.goda.time.MutableInterval

            guessValue = mutableInterval.getStart().getMillis() + (Time.getWidth(mutableInterval) / 2);
        } else {
            guessValue = mutableInterval.getStart().getMillis();
        }

        MutableInterval guess = new MutableInterval(guessValue, guessValue);

        return guess;
    }
View Full Code Here

Examples of org.goda.time.MutableInterval

        if (time.isAfterNow() && (options.getContext() == PointerType.PAST)) {
            time.addDays(-1);
        }

        MutableInterval result = new MutableInterval(time, time);
        result.setStart(time);
        result.setEnd(time);

        return result;
    }
View Full Code Here

Examples of org.goda.time.MutableInterval

      int increment = (tick.isAmbiguous()) ? halfDay : fullDay;
      int direction = (pointer == Pointer.PointerType.FUTURE) ? 1 : -1;
      _currentTime = _currentTime.plusSeconds( direction * increment);
    }

    return new MutableInterval(_currentTime, _currentTime.plusSeconds(getWidth()));
  }
View Full Code Here

Examples of org.goda.time.MutableInterval

      }
    }
    else {
      _currentDayStart = _currentDayStart.plusDays( direction * 7);
    }
    return new MutableInterval(_currentDayStart, _currentDayStart.plusMonths(1));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.