本文整理汇总了Java中org.joda.time.LocalTime.plusMinutes方法的典型用法代码示例。如果您正苦于以下问题:Java LocalTime.plusMinutes方法的具体用法?Java LocalTime.plusMinutes怎么用?Java LocalTime.plusMinutes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.joda.time.LocalTime
的用法示例。
在下文中一共展示了LocalTime.plusMinutes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: withLessonNumber
import org.joda.time.LocalTime; //导入方法依赖的package包/类
private List<JsonLesson> withLessonNumber(JsonLesson lesson, int lessonNo) {
PlainLesson plainLesson = getPlainLesson(lessonNo);
LocalTime startTime = LocalTime.parse("08:00");
LocalTime lessonStart = startTime.plusHours(lessonNo);
LocalTime lessonEnd = lessonStart.plusMinutes(45);
JsonLesson res = ImmutableJsonLesson.copyOf(lesson)
.withSubject(getLessonSubject(plainLesson))
.withTeacher(getLessonTeacher(plainLesson))
.withLessonNo(lessonNo)
.withHourFrom(lessonStart)
.withHourTo(lessonEnd);
return Lists.newArrayList(res);
}
示例2: lessonAt
import org.joda.time.LocalTime; //导入方法依赖的package包/类
private LessonRange lessonAt(int hour, int minutes) {
LocalTime from = LocalTime.MIDNIGHT
.withHourOfDay(hour)
.withMinuteOfHour(minutes);
LocalTime to = from.plusMinutes(45);
return ImmutableLessonRange.of(Optional.of(from), Optional.of(to));
}
示例3: lessonAt
import org.joda.time.LocalTime; //导入方法依赖的package包/类
public static LessonRange lessonAt(int hour, int minutes) {
LocalTime from = LocalTime.MIDNIGHT
.withHourOfDay(hour)
.withMinuteOfHour(minutes);
LocalTime to = from.plusMinutes(45);
return ImmutableLessonRange.builder()
.from(from)
.to(to)
.build();
}
示例4: time
import org.joda.time.LocalTime; //导入方法依赖的package包/类
private static LocalTime time(Integer deltaMinutes) {
LocalTime t = new LocalTime(12, 0, 0);
return deltaMinutes != null ? t.plusMinutes(deltaMinutes) : t;
}