Package org.threeten.bp.format

Examples of org.threeten.bp.format.DateTimeFormatterBuilder$ChronoPrinterParser


     * @param style  the length of the text required, not null
     * @param locale  the locale to use, not null
     * @return the text value of the zone, not null
     */
    public String getDisplayName(TextStyle style, Locale locale) {
        return new DateTimeFormatterBuilder().appendZoneText(style).toFormatter(locale).format(new DefaultInterfaceTemporalAccessor() {
            @Override
            public boolean isSupported(TemporalField field) {
                return false;
            }
            @Override
View Full Code Here


    }

    //-----------------------------------------------------------------------
    @Override
    public String getDisplayName(TextStyle style, Locale locale) {
        return new DateTimeFormatterBuilder().appendText(ERA, style).toFormatter(locale).format(this);
    }
View Full Code Here

     * @param style  the style of the text required, not null
     * @param locale  the locale to use, not null
     * @return the text value of the chronology, not null
     */
    public String getDisplayName(TextStyle style, Locale locale) {
        return new DateTimeFormatterBuilder().appendChronologyText(style).toFormatter(locale).format(new DefaultInterfaceTemporalAccessor() {
            @Override
            public boolean isSupported(TemporalField field) {
                return false;
            }
            @Override
View Full Code Here

   * @param datePattern  the date pattern to wrap, not null
   */
  public AbstractDateAdapter(String datePattern) {
    // Use a case insensitive pattern so a string of the
    // form MAR15 can be parsed to March 2015
    _formatter = new DateTimeFormatterBuilder()
        .parseCaseInsensitive()
        .append(DateTimeFormatter.ofPattern(datePattern))
        .toFormatter();
  }
View Full Code Here

    _dataProvider = dataProvider;
    _dataField = dataField;
    _observationTime = observationTime;
    _idScheme = idScheme;

    DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
    builder.appendPattern(dateFormat == null ? "yyyyMMdd" : dateFormat);
    CSV_DATE_FORMATTER = builder.toFormatter();   
  }
View Full Code Here

    _dataProvider = dataProvider;
    _dataField = dataField;
    _observationTime = observationTime;
    _idScheme = idScheme;

    DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
    builder.appendPattern(dateFormat == null ? "yyyyMMdd" : dateFormat);
    CSV_DATE_FORMATTER = builder.toFormatter();
  }
View Full Code Here

      System.out.println(info);
    }
  }
 
  private static void printVersionListQuery(SnapshotUtils snapshotUtils, String optionValue) {
    DateTimeFormatter dateTimeFormatter = new DateTimeFormatterBuilder()
      .appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD)
      .appendLiteral('-')
      .appendValue(MONTH_OF_YEAR, 2)
      .appendLiteral('-')
      .appendValue(DAY_OF_MONTH, 2)
View Full Code Here

    LocalDate[] existingDates = {LocalDate.of(2010,1,1), LocalDate.of(2011,1,1)};
    double[] existingValues = {1.0, 2.0};
    LocalDateDoubleTimeSeries existingDataPoints = ImmutableLocalDateDoubleTimeSeries.of(existingDates, existingValues);

    // Read in the time series directly from the file and construct a time series to compare with
    DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
    builder.appendPattern(DATE_FORMAT);
    DateTimeFormatter dateFormat = builder.toFormatter();

    String readId = "";
    List<LocalDate> dates = new ArrayList<LocalDate>();
    List<Double> values = new ArrayList<Double>();
    CSVReader csvReader = null;
View Full Code Here

 
 
  
  private SheetReader buildMockSheetReader(LocalDateDoubleTimeSeries lddts) {
   
    DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
    builder.appendPattern(DATE_FORMAT);
    DateTimeFormatter dateFormat = builder.toFormatter();

    SheetReader mock = mock(SheetReader.class);
    OngoingStubbing<Map<String, String>> stub = when(mock.loadNextRow());
    for (Map.Entry<LocalDate, Double> entry : lddts) {
      Map<String, String> row = new HashMap<String, String>();
View Full Code Here

TOP

Related Classes of org.threeten.bp.format.DateTimeFormatterBuilder$ChronoPrinterParser

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.