org.threeten.bp.LocalDate.toString()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(125)

本文整理了Java中org.threeten.bp.LocalDate.toString()方法的一些代码示例,展示了LocalDate.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalDate.toString()方法的具体详情如下:
包路径:org.threeten.bp.LocalDate
类名称:LocalDate
方法名:toString

LocalDate.toString介绍

[英]Outputs this date as a String, such as 2007-12-23.

The output will be in the ISO-8601 format yyyy-MM-dd.
[中]以字符串形式输出此日期,例如2007-12-23。
输出将采用ISO-8601格式yyyy-MM-dd。

代码示例

代码示例来源:origin: com.torodb.torod.backends/postgresql

@Override
public Void visit(ScalarDate value, StringBuilder arg) {
  arg.append('"')
      //this prints the value on ISO-8601, which is the recommended format on PostgreSQL
      .append(value.getValue().toString())
      .append('"');
  return null;
}

代码示例来源:origin: com.torodb.torod.backends/postgresql

@Override
public Void visit(ScalarDate value, StringBuilder arg) {
  arg.append('\'')
      //this prints the value on ISO-8601, which is the recommended format on PostgreSQL
      .append(value.getValue().toString())
      .append('\'');
  return null;
}

代码示例来源:origin: com.torodb.torod.backends/greenplum

@Override
public Void visit(ScalarDate value, StringBuilder arg) {
  arg.append('\'')
      //this prints the value on ISO-8601, which is the recommended format on PostgreSQL
      .append(value.getValue().toString())
      .append('\'');
  return null;
}

代码示例来源:origin: com.torodb.torod.backends/greenplum

@Override
public Void visit(ScalarDate value, StringBuilder arg) {
  arg.append('"')
      //this prints the value on ISO-8601, which is the recommended format on PostgreSQL
      .append(value.getValue().toString())
      .append('"');
  return null;
}

代码示例来源:origin: com.torodb.kvdocument/kvdocument-core

@Override
public String toString() {
  return getValue().toString();
}

代码示例来源:origin: com.torodb.torod/torod-core

@Override
public String toString() {
  return getValue().toString();
}

代码示例来源:origin: org.threeten/threetenbp

/**
 * Outputs this date-time as a {@code String}, such as {@code 2007-12-03T10:15:30}.
 * <p>
 * The output will be one of the following ISO-8601 formats:
 * <p><ul>
 * <li>{@code yyyy-MM-dd'T'HH:mm}</li>
 * <li>{@code yyyy-MM-dd'T'HH:mm:ss}</li>
 * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSS}</li>
 * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSSSSS}</li>
 * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS}</li>
 * </ul><p>
 * The format used will be the shortest that outputs the full value of
 * the time where the omitted parts are implied to be zero.
 *
 * @return a string representation of this date-time, not null
 */
@Override
public String toString() {
  return date.toString() + 'T' + time.toString();
}

代码示例来源:origin: ThreeTen/threetenbp

/**
 * Outputs this date-time as a {@code String}, such as {@code 2007-12-23T10:15:30}.
 * <p>
 * The output will be one of the following ISO-8601 formats:
 * <p><ul>
 * <li>{@code yyyy-MM-dd'T'HH:mm}</li>
 * <li>{@code yyyy-MM-dd'T'HH:mm:ss}</li>
 * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSS}</li>
 * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSSSSS}</li>
 * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS}</li>
 * </ul><p>
 * The format used will be the shortest that outputs the full value of
 * the time where the omitted parts are implied to be zero.
 *
 * @return a string representation of this date-time, not null
 */
@Override
public String toString() {
  return date.toString() + 'T' + time.toString();
}

代码示例来源:origin: com.github.joschi.jackson/jackson-datatype-threetenbp

@Override
public void serialize(LocalDate date, JsonGenerator generator, SerializerProvider provider) throws IOException
{
  if (useTimestamp(provider)) {
    generator.writeStartArray();
    generator.writeNumber(date.getYear());
    generator.writeNumber(date.getMonthValue());
    generator.writeNumber(date.getDayOfMonth());
    generator.writeEndArray();
  } else {
    String str = (_formatter == null) ? date.toString() : date.format(_formatter);
    generator.writeString(str);
  }
}

代码示例来源:origin: guanpj/JReadHub

mTxtTopicTime.setText(mTopicBean.getFormattedPublishDate().toLocalDate().toString() + "  " +
      mTopicBean.getFormattedPublishDate().toLocalTime().toString().substring(0, 8));
} else {

代码示例来源:origin: shrikanth7698/Collapsible-Calendar-View-Android

collapsibleCalendar.addEventTag(tomorrow, Color.BLUE);
Log.d("Testing date ", collapsibleCalendar.getSelectedDay().toString());
collapsibleCalendar.setCalendarListener(new CollapsibleCalendar.CalendarListener() {
  @Override

相关文章