Examples of parseDateTime()


Examples of com.facebook.presto.jdbc.internal.joda.time.format.DateTimeFormatter.parseDateTime()

        // before slash
        char c = leftStr.charAt(0);
        if (c == 'P' || c == 'p') {
            period = periodParser.withParseType(getPeriodType(leftStr)).parsePeriod(leftStr);
        } else {
            DateTime start = dateTimeParser.parseDateTime(leftStr);
            startInstant = start.getMillis();
            parsedChrono = start.getChronology();
        }
       
        // after slash
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.joda.time.format.DateTimeFormatter.parseDateTime()

            }
            period = periodParser.withParseType(getPeriodType(rightStr)).parsePeriod(rightStr);
            chrono = (chrono != null ? chrono : parsedChrono);
            endInstant = chrono.add(period, startInstant, 1);
        } else {
            DateTime end = dateTimeParser.parseDateTime(rightStr);
            endInstant = end.getMillis();
            parsedChrono = (parsedChrono != null ? parsedChrono : end.getChronology());
            chrono = (chrono != null ? chrono : parsedChrono);
            if (period != null) {
                startInstant = chrono.add(period, endInstant, -1);
View Full Code Here

Examples of java.text.Format.parseDateTime()

        String strValue = (String) value;
        DateTimeFormatter formatter = null;
        try {
          boolean spaces = strValue.indexOf(' ') != -1;
          formatter = ERXRestUtils.jodaLocalDateTimeFormat(spaces, context);
          parsedValue = new LocalDateTime(formatter.parseDateTime(strValue));
        }
        catch (Throwable t) {
          String msg = "Failed to parse '" + strValue + "' as a timestamp";
          if (formatter != null) {
            msg += " (example: " + formatter.print(new LocalDateTime()) + ")";
View Full Code Here

Examples of java.text.SimpleDateFormat.parseDateTime()

        String strValue = (String) value;
        DateTimeFormatter formatter = null;
        try {
          boolean spaces = strValue.indexOf(' ') != -1;
          formatter = ERXRestUtils.jodaLocalDateTimeFormat(spaces, context);
          parsedValue = new LocalDateTime(formatter.parseDateTime(strValue));
        }
        catch (Throwable t) {
          String msg = "Failed to parse '" + strValue + "' as a timestamp";
          if (formatter != null) {
            msg += " (example: " + formatter.print(new LocalDateTime()) + ")";
View Full Code Here

Examples of org.geotools.xml.impl.DatatypeConverterImpl.parseDateTime()

                return o1.getRid().compareTo(o2.getRid());
            }
        });

        final DatatypeConverterImpl dateParser = DatatypeConverterImpl.getInstance();
        final Date date1 = dateParser.parseDateTime("1977-01-17T01:05:40Z").getTime();
        final Date date2 = dateParser.parseDateTime("2011-07-29T23:49:40Z").getTime();
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);

        // This is in consistent as the FIRST entry cannot have a previous1
        ResourceIdImpl resourceId =  new ResourceIdImpl("rid1", "abc", new Version(FIRST));
View Full Code Here

Examples of org.goda.time.format.DateTimeFormatter.parseDateTime()

        // before slash
        char c = leftStr.charAt(0);
        if (c == 'P' || c == 'p') {
            period = periodParser.withParseType(getPeriodType(leftStr)).parsePeriod(leftStr);
        } else {
            DateTime start = dateTimeParser.parseDateTime(leftStr);
            startInstant = start.getMillis();
            parsedChrono = start.getChronology();
        }
       
        // after slash
View Full Code Here

Examples of org.joda.time.format.DateTimeFormatter.parseDateTime()

   public static String getDifferenceToNow(String utc) {
     if (utc == null) return "";
     utc = ReplaceVariable.replaceAll(utc, " ", "T");
     DateTime now = new DateTime();
     DateTimeFormatter f = ISODateTimeFormat.dateTimeParser();
     DateTime other = f.parseDateTime(utc);
     Period period = new Period(other, now); // Period(ReadableInstant startInstant, ReadableInstant endInstant)
     return period.toString();
   }

   /**
 
View Full Code Here

Examples of org.joda.time.format.DateTimeFormatter.parseDateTime()

        if (field == null) {
            throw new RuntimeException("Document has no field timestamp.");
        }

        DateTimeFormatter formatter = DateTimeFormat.forPattern(ES_DATE_FORMAT).withZoneUTC();
        DateTime dt = formatter.parseDateTime(field.toString());

        return (int) (dt.getMillis()/1000);
    }

    public static DateTime iso8601() {
View Full Code Here

Examples of org.joda.time.format.DateTimeFormatter.parseDateTime()

  @Override
  protected void respond(AjaxRequestTarget target) {
    Request r = target.getPage().getRequest();
    ViewType type = ViewType.forCode(r.getRequestParameters().getParameterValue("view").toString());
    DateTimeFormatter fmt = ISODateTimeFormat.dateTimeParser().withZone(DateTimeZone.UTC);
    DateMidnight start = fmt.parseDateTime(r.getRequestParameters().getParameterValue("start").toString())
      .toDateMidnight();
    DateMidnight end = fmt.parseDateTime(r.getRequestParameters().getParameterValue("end").toString())
      .toDateMidnight();
    DateMidnight visibleStart = fmt.parseDateTime(
      r.getRequestParameters().getParameterValue("visibleStart").toString()).toDateMidnight();
View Full Code Here

Examples of org.joda.time.format.DateTimeFormatter.parseDateTime()

    Request r = target.getPage().getRequest();
    ViewType type = ViewType.forCode(r.getRequestParameters().getParameterValue("view").toString());
    DateTimeFormatter fmt = ISODateTimeFormat.dateTimeParser().withZone(DateTimeZone.UTC);
    DateMidnight start = fmt.parseDateTime(r.getRequestParameters().getParameterValue("start").toString())
      .toDateMidnight();
    DateMidnight end = fmt.parseDateTime(r.getRequestParameters().getParameterValue("end").toString())
      .toDateMidnight();
    DateMidnight visibleStart = fmt.parseDateTime(
      r.getRequestParameters().getParameterValue("visibleStart").toString()).toDateMidnight();
    DateMidnight visibleEnd = fmt
      .parseDateTime(r.getRequestParameters().getParameterValue("visibleEnd").toString()).toDateMidnight();
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.