本文整理了Java中org.threeten.bp.OffsetDateTime.getNano()
方法的一些代码示例,展示了OffsetDateTime.getNano()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OffsetDateTime.getNano()
方法的具体详情如下:
包路径:org.threeten.bp.OffsetDateTime
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!