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

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

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

OffsetDateTime.getNano介绍

[英]Gets the nano-of-second field.
[中]获取第二个字段的nano。

代码示例

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

@Override
  public int applyAsInt(OffsetDateTime dt) {
    return dt.getNano();
  }
},

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

@Override
  public int compare(OffsetDateTime datetime1, OffsetDateTime datetime2) {
    int cmp = Jdk8Methods.compareLongs(datetime1.toEpochSecond(), datetime2.toEpochSecond());
    if (cmp == 0) {
      cmp = Jdk8Methods.compareLongs(datetime1.getNano(), datetime2.getNano());
    }
    return cmp;
  }
};

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

@Override
  public int compare(OffsetDateTime datetime1, OffsetDateTime datetime2) {
    int cmp = Jdk8Methods.compareLongs(datetime1.toEpochSecond(), datetime2.toEpochSecond());
    if (cmp == 0) {
      cmp = Jdk8Methods.compareLongs(datetime1.getNano(), datetime2.getNano());
    }
    return cmp;
  }
};

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

ChronoField f = (ChronoField) field;
switch (f) {
  case INSTANT_SECONDS: return ofInstant(Instant.ofEpochSecond(newValue, getNano()), offset);
  case OFFSET_SECONDS: {
    return with(dateTime, ZoneOffset.ofTotalSeconds(f.checkValidIntValue(newValue)));

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

ChronoField f = (ChronoField) field;
switch (f) {
  case INSTANT_SECONDS: return ofInstant(Instant.ofEpochSecond(newValue, getNano()), offset);
  case OFFSET_SECONDS: {
    return with(dateTime, ZoneOffset.ofTotalSeconds(f.checkValidIntValue(newValue)));

代码示例来源:origin: ngs-doo/dsl-json

buf[pos + 17] = ':';
NumberConverter.write2(value.getSecond(), buf, pos + 18);
final int nano = value.getNano();
if (nano != 0) {
  final int end = writeNano(buf, pos, nano);

相关文章