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

x33g5p2x  于2022-01-26 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(230)

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

OffsetDateTime.from介绍

[英]Obtains an instance of OffsetDateTime from a temporal object.

A TemporalAccessor represents some form of date and time information. This factory converts the arbitrary temporal object to an instance of OffsetDateTime.

The conversion extracts and combines LocalDateTime and ZoneOffset. If that fails it will try to extract and combine Instant and ZoneOffset.

This method matches the signature of the functional interface TemporalQueryallowing it to be used in queries via method reference, OffsetDateTime::from.
[中]从时态对象获取OffsetDateTime的实例。
临时助理代表某种形式的日期和时间信息。该工厂将任意时态对象转换为OffsetDateTime的实例。
转换提取并组合LocalDateTime和ZoneOffset。如果失败,它将尝试提取并组合Instant和ZoneOffset。
此方法匹配函数接口TemporalQueryLow的签名,通过方法引用OffsetDateTime::from将其用于查询。

代码示例

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

@Override
  public OffsetDateTime queryFrom(TemporalAccessor temporal) {
    return OffsetDateTime.from(temporal);
  }
};

代码示例来源:origin: mercadolibre/java-sdk

@Override
 public OffsetDateTime apply(TemporalAccessor temporalAccessor) {
  return OffsetDateTime.from(temporalAccessor);
 }
},

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

@Override
  public OffsetDateTime queryFrom(TemporalAccessor temporal) {
    return OffsetDateTime.from(temporal);
  }
};

代码示例来源:origin: gengstrand/clojure-news-feed

@Override
 public OffsetDateTime apply(TemporalAccessor temporalAccessor) {
  return OffsetDateTime.from(temporalAccessor);
 }
},

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

@Override
  public OffsetDateTime apply(TemporalAccessor temporalAccessor) {
    return OffsetDateTime.from(temporalAccessor);
  }
},

代码示例来源:origin: XeroAPI/Xero-Java

@Override
 public OffsetDateTime apply(TemporalAccessor temporalAccessor) {
  return OffsetDateTime.from(temporalAccessor);
 }
},

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

OffsetDateTime end = OffsetDateTime.from(endExclusive);
if (unit instanceof ChronoUnit) {
  end = end.withOffsetSameInstant(offset);

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

OffsetDateTime end = OffsetDateTime.from(endExclusive);
if (unit instanceof ChronoUnit) {
  end = end.withOffsetSameInstant(offset);

相关文章