Package ch.agent.t2.time

Examples of ch.agent.t2.time.TimeIndex.asLong()


    TimeIndex t = begin.getDate(domain);
    if (t.compareTo(time) > 0) {
      if (keepBegin)
        setTime(t);
      else {
        long diff = t.asLong() - time.asLong();
        long test = begin.offset + diff;
        if (Math.abs(test) <= Integer.MAX_VALUE)
          begin.incr((int)diff);
        else // change from TODAY to LITERAL
          begin.setTime(time);
View Full Code Here


   */
  private void eVRLiteralToday(TimeDomain domain, DayExpression begin, boolean keepBegin) throws T2Exception {
    TimeIndex t = getDate(domain);
    if (begin.time.compareTo(t) > 0) {
      if (keepBegin) {
        long diff = begin.time.asLong() - t.asLong();
        long test = offset + diff;
        if (Math.abs(test) <= Integer.MAX_VALUE)
          incr((int) diff);
        else
          // change from TODAY to LITERAL
View Full Code Here

  }
 
  // convert "difficult" calendars to Day and increase resolution to milliseconds
  private static long yearOrMonthToMillisecSinceEpoch (long year, int month) throws T2Exception {
    TimeIndex m = Day.DOMAIN.time(year, month, 1, 0, 0, 0, 0, Adjustment.NONE);
    long index = m.asLong() * 24L * 3600000L;
    return index = index - epoch;
  }
 
  private static long dayOrLessToMillisecSinceEpoch (TimeIndex t) throws T2Exception {
    long index = new SystemTime(t.toString()).asLong();
View Full Code Here

    TimeIndex t = begin.getDate(domain);
    if (t.compareTo(time) > 0) {
      if (keepBegin)
        setTime(t);
      else {
        long diff = t.asLong() - time.asLong();
        long test = begin.offset + diff;
        if (Math.abs(test) <= Integer.MAX_VALUE)
          begin.incr((int)diff);
        else // change from TODAY to LITERAL
          begin.setTime(time);
View Full Code Here

   */
  private void eVRLiteralToday(TimeDomain domain, DayExpression begin, boolean keepBegin) throws T2Exception {
    TimeIndex t = getDate(domain);
    if (begin.time.compareTo(t) > 0) {
      if (keepBegin) {
        long diff = begin.time.asLong() - t.asLong();
        long test = offset + diff;
        if (Math.abs(test) <= Integer.MAX_VALUE)
          incr((int) diff);
        else
          // change from TODAY to LITERAL
View Full Code Here

  }
 
  // convert "difficult" calendars to Day and increase resolution to milliseconds
  private static long yearOrMonthToMillisecSinceEpoch (long year, int month) throws T2Exception {
    TimeIndex m = Day.DOMAIN.time(year, month, 1, 0, 0, 0, 0, Adjustment.NONE);
    long index = m.asLong() * 24L * 3600000L;
    return index = index - epoch;
  }
 
  private static long dayOrLessToMillisecSinceEpoch (TimeIndex t) throws T2Exception {
    long index = new SystemTime(t.toString()).asLong();
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.