本文整理汇总了Java中org.joda.time.LocalTime.fromMillisOfDay方法的典型用法代码示例。如果您正苦于以下问题:Java LocalTime.fromMillisOfDay方法的具体用法?Java LocalTime.fromMillisOfDay怎么用?Java LocalTime.fromMillisOfDay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.joda.time.LocalTime
的用法示例。
在下文中一共展示了LocalTime.fromMillisOfDay方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUpTime
import org.joda.time.LocalTime; //导入方法依赖的package包/类
private void setUpTime() {
mDisposableTaskDate.setText(DATE_FORMATTER.print(LocalDate.now()));
mDisposableTaskTime.setText(TIME_FORMATTER.print(LocalTime.now()));
if (mTimedTask == null) {
mDailyTaskRadio.setChecked(true);
return;
}
if (mTimedTask.isDisposable()) {
mDisposableTaskRadio.setChecked(true);
mDisposableTaskTime.setText(TIME_FORMATTER.print(mTimedTask.getMillis()));
mDisposableTaskDate.setText(DATE_FORMATTER.print(mTimedTask.getMillis()));
return;
}
LocalTime time = LocalTime.fromMillisOfDay(mTimedTask.getMillis());
mDailyTaskTimePicker.setCurrentHour(time.getHourOfDay());
mDailyTaskTimePicker.setCurrentMinute(time.getMinuteOfHour());
if (mTimedTask.isDaily()) {
mDailyTaskRadio.setChecked(true);
} else {
mWeeklyTaskRadio.setChecked(true);
for (int i = 0; i < mDayOfWeekCheckBoxes.size(); i++) {
mDayOfWeekCheckBoxes.get(i).setChecked(mTimedTask.hasDayOfWeek(i + 1));
}
}
}
示例2: getNextTime
import org.joda.time.LocalTime; //导入方法依赖的package包/类
public long getNextTime() {
if (isDisposable()) {
return mMillis;
}
if (isDaily()) {
LocalTime time = LocalTime.fromMillisOfDay(mMillis);
long nextTimeMillis = time.toDateTimeToday().getMillis();
if (System.currentTimeMillis() > nextTimeMillis) {
return nextTimeMillis + TimeUnit.DAYS.toMillis(1);
}
return nextTimeMillis;
}
return getNextTimeOfWeeklyTask();
}
示例3: convertToMapped
import org.joda.time.LocalTime; //导入方法依赖的package包/类
@Override
public LocalTime convertToMapped(Class<? extends LocalTime> type, Integer value) {
if (value == null) {
return null;
}
return LocalTime.fromMillisOfDay(value);
}