Examples of parseMillis()


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

        String author = prop.getStringValue(SVNProperty.LAST_AUTHOR);
        User user = User.findByLoginId(author);

        String commitDate = prop.getStringValue(SVNProperty.COMMITTED_DATE);
        DateTimeFormatter dateFormatter = ISODateTimeFormat.dateTime();
        Long commitTime = dateFormatter.parseMillis(commitDate);

        ObjectNode result = Json.newObject();
        result.put("type", "file");
        result.put("revisionNo", prop.getStringValue(SVNProperty.COMMITTED_REVISION));
        result.put("author", author);
View Full Code Here

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

    this.timeFormat = timeFormat;
    this.start = start;
    this.end = end;
   
    DateTimeFormatter format = TimeUtil.toDateTimeFormatter("time format", timeFormat);
    long startInstant = format.parseMillis(start);
    long endInstant = format.parseMillis(end);
   
    try{
      this.interval = new Interval(startInstant, endInstant);
    }catch(IllegalArgumentException e) {
View Full Code Here

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

    this.start = start;
    this.end = end;
   
    DateTimeFormatter format = TimeUtil.toDateTimeFormatter("time format", timeFormat);
    long startInstant = format.parseMillis(start);
    long endInstant = format.parseMillis(end);
   
    try{
      this.interval = new Interval(startInstant, endInstant);
    }catch(IllegalArgumentException e) {
      String msg = String.format(
View Full Code Here

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

    this.value = value;
    this.fnName = fnName;
   
    DateTimeFormatter formatter = TimeUtil.toDateTimeFormatter("time format", timeFormat);
   
    long timeInMs = formatter.parseMillis(value);
    this.longPredicate = new NumericValuePredicate(timeInMs, fnName);
  }

  @Override
    public boolean apply(@Nullable Long input) {
View Full Code Here

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

        DateTimeFormatter formatter = DATETIME_FORMATTER_CACHE.get(formatString)
                .withChronology(getChronology(session.getTimeZoneKey()))
                .withLocale(session.getLocale());

        try {
            return formatter.parseMillis(dateTime.toString(Charsets.UTF_8));
        }
        catch (IllegalArgumentException e) {
            throw new PrestoException(StandardErrorCode.INVALID_FUNCTION_ARGUMENT.toErrorCode(), e);
        }
    }
View Full Code Here

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

    {
        String pattern = formatString.toString(Charsets.UTF_8);
        DateTimeFormatter formatter = DateTimeFormat.forPattern(pattern).withZoneUTC();

        String datetimeString = datetime.toString(Charsets.UTF_8);
        return fromMillis(formatter.parseMillis(datetimeString));
    }

    @Description("formats the given time by the given format")
    @ScalarFunction
    public static Slice formatDatetime(long unixTime, Slice formatString)
View Full Code Here

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

    @ScalarFunction
    public static long dateParse(Slice dateTime, Slice formatString)
    {
        DateTimeFormatter formatter = DATETIME_FORMATTER_CACHE.get(formatString);
        return fromMillis(formatter.parseMillis(dateTime.toString(Charsets.UTF_8)));
    }

    @Description("second of the minute of the given time")
    @ScalarFunction
    public static long second(long unixTime)
View Full Code Here

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

    {
        String pattern = formatString.toString(Charsets.UTF_8);
        DateTimeFormatter formatter = DateTimeFormat.forPattern(pattern).withZoneUTC();

        String datetimeString = datetime.toString(Charsets.UTF_8);
        return fromMillis(formatter.parseMillis(datetimeString));
    }

    @Description("formats the given time by the given format")
    @ScalarFunction
    public static Slice formatDatetime(long unixTime, Slice formatString)
View Full Code Here

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

    @ScalarFunction
    public static long dateParse(Slice dateTime, Slice formatString)
    {
        DateTimeFormatter formatter = DATETIME_FORMATTER_CACHE.get(formatString);
        return fromMillis(formatter.parseMillis(dateTime.toString(Charsets.UTF_8)));
    }

    @Description("second of the minute of the given time")
    @ScalarFunction
    public static long second(long unixTime)
View Full Code Here

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

        DateTimeFormatter formatter = DATETIME_FORMATTER_CACHE.get(formatString)
                .withChronology(getChronology(session.getTimeZoneKey()))
                .withLocale(session.getLocale());

        try {
            return formatter.parseMillis(dateTime.toString(Charsets.UTF_8));
        }
        catch (IllegalArgumentException e) {
            throw new PrestoException(StandardErrorCode.INVALID_FUNCTION_ARGUMENT.toErrorCode(), e);
        }
    }
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.