Examples of parseMillis()


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()

    }

    private long parseStringValue(String value, DateTimeZone timeZone) {
        try {
            DateTimeFormatter parser = getDateTimeFormatterParser(dateTimeFormatter, timeZone);
            return parser.parseMillis(value);
        } catch (RuntimeException e) {
            try {
                // When date is given as a numeric value, it's a date in ms since epoch
                // By definition, it's a UTC date.
                long time = Long.parseLong(value);
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
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.