Examples of toEpochDay()


Examples of org.threeten.bp.LocalDate.toEpochDay()

   * @param date in integer YYYYMMDD representation
   * @return the epoch millis
   */
  public static long getUTCEpochMilis(int date) {
    LocalDate localDate = LocalDate.parse(String.valueOf(date), YYYYMMDD_LOCAL_DATE);
    return localDate.toEpochDay() * 24 * 60 * 60 * 1000;
  }

  /**
   * Converts a date in integer YYYYMMDD representation to a UTC date-time.
   *
 
View Full Code Here

Examples of org.threeten.bp.LocalDate.toEpochDay()

    result.put("summary", summary);
    if (mode == ConversionMode.FULL) {
      Object[] tsData = new Object[series.size()];
      for (int i = 0; i < series.size(); i++) {
        LocalDate date = series.getTimeAtIndex(i);
        long epochMillis = date.toEpochDay() * MILLIS_PER_DAY;
        tsData[i] = new Object[]{epochMillis, series.getValueAtIndex(i)};
      }
      Map<String, Object> ts = ImmutableMap.<String, Object>of(
          "template_data", ImmutableMap.<String, Object>of(
              "data_field", valueSpec.getValueName(),
View Full Code Here

Examples of org.threeten.bp.LocalDate.toEpochDay()

  public Map<String, Object> formatExpanded(LocalDateDoubleTimeSeries value) {
    List<Object[]> data = Lists.newArrayListWithCapacity(value.size());
    for (LocalDateDoubleEntryIterator it = value.iterator(); it.hasNext(); ) {
      LocalDate date = it.nextTime();
      long epochMillis = date.toEpochDay() * MILLIS_PER_DAY;
      data.add(new Object[]{epochMillis, it.currentValue()});
    }
    Map<String, String> templateData = ImmutableMap.of("data_field", "Historical Time Series",
                                                       "observation_time", "Historical Time Series");
    Map<String, Object> timeSeries = ImmutableMap.of("fieldLabels", new String[]{"Time", "Value"},
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.