Package org.openntf.formula

Examples of org.openntf.formula.DateTime


    int hour = readInteger();
    int minute = readInteger();
    int second = readInteger();
    if (iFormatter == null)
      iFormatter = new FormatterImpl(Locale.getDefault());
    DateTime ret = iFormatter.getNewSDTInstance();
    ret.setLocalDate(year, month, day);
    ret.setLocalTime(hour, minute, second, 0);
    return ret;
  }
View Full Code Here


      Double d = (Double) o;
      iDumpPS.println("(Double)=" + d.toString());
      return;
    }
    if (o instanceof DateTime) {
      DateTime d = (DateTime) o;
      iDumpPS.println("(DateTime)=" + d.toString());
      return;
    }
    throw new LSExtConvertException("Unsupported Java type: " + o.getClass().getName());
  }
View Full Code Here

  public DateTime getNewSDTInstance() {
    return new DateTimeImpl(iLocale);
  }

  public DateTime getNewInitializedSDTInstance(final Date date, final boolean noDate, final boolean noTime) {
    DateTime sdt = getNewSDTInstance();
    sdt.setLocalTime(date);
    if (noDate)
      sdt.setAnyDate();
    if (noTime)
      sdt.setAnyTime();
    return sdt;
  }
View Full Code Here

  public DateTime parseDate(final String image) {
    return parseDate(image, false);
  }

  public DateTime parseDate(final String image, final boolean parseLenient) {
    DateTime ret = getNewSDTInstance();
    ret.setLocalTime(image, parseLenient);
    return ret;
  }
View Full Code Here

  }

  public DateTime parseDateWithFormat(final String image, final String format, final boolean parseLenient) {
    boolean[] noDT = new boolean[2];
    Calendar cal = parseDateToCalWithFormat(image, format, noDT, parseLenient);
    DateTime ret = getNewInitializedSDTInstance(cal.getTime(), noDT[0], noDT[1]);
    return ret;
  }
View Full Code Here

TOP

Related Classes of org.openntf.formula.DateTime

Copyright © 2018 www.massapicom. 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.