org.joda.time.LocalTime.minuteOfHour()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(264)

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

LocalTime.minuteOfHour介绍

[英]Get the minute of hour field property which provides access to advanced functionality.
[中]获取提供高级功能访问权限的分钟字段属性。

代码示例

代码示例来源:origin: com.fasterxml.jackson.datatype/jackson-datatype-joda

@Override
  public void serialize(LocalTime value, JsonGenerator gen, SerializerProvider provider) throws IOException
  {
    if (_serializationShape(provider) == FORMAT_STRING) {
      gen.writeString(_format.createFormatter(provider).print(value));
      return;
    }
    // Timestamp here actually means an array of values
    gen.writeStartArray();
    gen.writeNumber(value.hourOfDay().get());
    gen.writeNumber(value.minuteOfHour().get());
    gen.writeNumber(value.secondOfMinute().get());
    gen.writeNumber(value.millisOfSecond().get());
    gen.writeEndArray();
  }
}

代码示例来源:origin: Jasig/uPortal

TimeDimensionImpl(LocalTime time) {
  this.id = -1;
  this.time = time.minuteOfHour().roundFloorCopy(); // truncate at minute level
  this.hour = this.time.getHourOfDay();
  this.minute = this.time.getMinuteOfHour();
  this.fiveMinuteIncrement = this.minute / 5;
}

代码示例来源:origin: Jasig/uPortal

@OpenEntityManager(unitName = BaseAggrEventsJpaDao.PERSISTENCE_UNIT_NAME)
  @Override
  public TimeDimension getTimeDimensionByTime(LocalTime localTime) {
    final NaturalIdQuery<TimeDimensionImpl> query =
        this.createNaturalIdQuery(TimeDimensionImpl.class);
    query.using(TimeDimensionImpl_.time, localTime.minuteOfHour().roundFloorCopy());
    return query.load();
  }
}

相关文章