本文整理了Java中org.threeten.bp.LocalTime.getSecond()
方法的一些代码示例,展示了LocalTime.getSecond()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalTime.getSecond()
方法的具体详情如下:
包路径:org.threeten.bp.LocalTime
类名称:LocalTime
方法名:getSecond
[英]Gets the second-of-minute field.
[中]获取分钟数字段的秒数。
代码示例来源:origin: ThreeTen/threetenbp
/**
* Gets the second-of-minute field.
*
* @return the second-of-minute, from 0 to 59
*/
public int getSecond() {
return time.getSecond();
}
代码示例来源:origin: org.threeten/threetenbp
/**
* Gets the second-of-minute field.
*
* @return the second-of-minute, from 0 to 59
*/
public int getSecond() {
return time.getSecond();
}
代码示例来源:origin: ThreeTen/threetenbp
/**
* Gets the second-of-minute field.
*
* @return the second-of-minute, from 0 to 59
*/
public int getSecond() {
return time.getSecond();
}
代码示例来源:origin: org.threeten/threetenbp
/**
* Gets the second-of-minute field.
*
* @return the second-of-minute, from 0 to 59
*/
public int getSecond() {
return time.getSecond();
}
代码示例来源:origin: ThreeTen/threetenbp
/**
* Converts a {@code LocalTime} to a {@code java.sql.Time}.
*
* @param time the local time, not null
* @return the SQL time, not null
*/
@SuppressWarnings("deprecation")
public static java.sql.Time toSqlTime(LocalTime time) {
return new java.sql.Time(time.getHour(), time.getMinute(), time.getSecond());
}
代码示例来源:origin: org.threeten/threetenbp
/**
* Converts a {@code LocalTime} to a {@code java.sql.Time}.
*
* @param time the local time, not null
* @return the SQL time, not null
*/
@SuppressWarnings("deprecation")
public static java.sql.Time toSqlTime(LocalTime time) {
return new java.sql.Time(time.getHour(), time.getMinute(), time.getSecond());
}
代码示例来源:origin: com.github.joschi.jackson/jackson-datatype-threetenbp
@Override
public void serialize(LocalTime value, JsonGenerator g, SerializerProvider provider) throws IOException
{
if (useTimestamp(provider)) {
g.writeStartArray();
g.writeNumber(value.getHour());
g.writeNumber(value.getMinute());
if(value.getSecond() > 0 || value.getNano() > 0)
{
g.writeNumber(value.getSecond());
if(value.getNano() > 0)
{
if(provider.isEnabled(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS))
g.writeNumber(value.getNano());
else
g.writeNumber(value.get(ChronoField.MILLI_OF_SECOND));
}
}
g.writeEndArray();
} else {
DateTimeFormatter dtf = _formatter;
if (dtf == null) {
dtf = _defaultFormatter();
}
g.writeString(value.format(dtf));
}
}
内容来源于网络,如有侵权,请联系作者删除!