本文整理了Java中org.joda.time.YearMonthDay.toDateTime()
方法的一些代码示例,展示了YearMonthDay.toDateTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YearMonthDay.toDateTime()
方法的具体详情如下:
包路径:org.joda.time.YearMonthDay
类名称:YearMonthDay
方法名:toDateTime
[英]Converts this object to a DateTime using a TimeOfDay to fill in the missing fields and using the default time zone. This instance is immutable and unaffected by this method call.
The resulting chronology is determined by the chronology of this YearMonthDay plus the time zone. The chronology of the time is ignored - only the field values are used.
[中]使用TimeOfDay填充缺少的字段并使用默认时区将此对象转换为DateTime。此实例是不可变的,不受此方法调用的影响。
由此产生的年表由今年的年表MonthDay加上时区确定。忽略时间的年表-只使用字段值。
代码示例来源:origin: joda-time/joda-time
/**
* Converts this object to a DateTime using a TimeOfDay to fill in the
* missing fields and using the default time zone.
* This instance is immutable and unaffected by this method call.
* <p>
* The resulting chronology is determined by the chronology of this
* YearMonthDay plus the time zone.
* The chronology of the time is ignored - only the field values are used.
*
* @param time the time of day to use, null means current time
* @return the DateTime instance
*/
public DateTime toDateTime(TimeOfDay time) {
return toDateTime(time, null);
}
代码示例来源:origin: FenixEdu/fenixedu-academic
@Override
public List<Interval> getEventSpaceOccupationIntervals(YearMonthDay startDateToSearch, YearMonthDay endDateToSearch) {
List<Interval> result = new ArrayList<Interval>();
Collection<LessonInstance> lessonInstances = getLessonInstancesSet();
DateTime startDateTime = startDateToSearch != null ? startDateToSearch.toDateTimeAtMidnight() : null;
DateTime endDateTime = endDateToSearch != null ? endDateToSearch.toDateTime(new TimeOfDay(23, 59, 59)) : null;
for (LessonInstance lessonInstance : lessonInstances) {
if (startDateTime == null
|| (!lessonInstance.getEndDateTime().isBefore(startDateTime) && !lessonInstance.getBeginDateTime().isAfter(
endDateTime))) {
result.add(new Interval(lessonInstance.getBeginDateTime(), lessonInstance.getEndDateTime()));
}
}
return result;
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Converts this object to a DateTime using a TimeOfDay to fill in the
* missing fields and using the default time zone.
* This instance is immutable and unaffected by this method call.
* <p>
* The resulting chronology is determined by the chronology of this
* YearMonthDay plus the time zone.
* The chronology of the time is ignored - only the field values are used.
*
* @param time the time of day to use, null means current time
* @return the DateTime instance
*/
public DateTime toDateTime(TimeOfDay time) {
return toDateTime(time, null);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Converts this object to a DateTime using a TimeOfDay to fill in the
* missing fields and using the default time zone.
* This instance is immutable and unaffected by this method call.
* <p>
* The resulting chronology is determined by the chronology of this
* YearMonthDay plus the time zone.
* The chronology of the time is ignored - only the field values are used.
*
* @param time the time of day to use, null means current time
* @return the DateTime instance
*/
public DateTime toDateTime(TimeOfDay time) {
return toDateTime(time, null);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time
/**
* Converts this object to a DateTime using a TimeOfDay to fill in the
* missing fields and using the default time zone.
* This instance is immutable and unaffected by this method call.
* <p>
* The resulting chronology is determined by the chronology of this
* YearMonthDay plus the time zone.
* The chronology of the time is ignored - only the field values are used.
*
* @param time the time of day to use, null means current time
* @return the DateTime instance
*/
public DateTime toDateTime(TimeOfDay time) {
return toDateTime(time, null);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Converts this object to a DateTime using a TimeOfDay to fill in the
* missing fields and using the default time zone.
* This instance is immutable and unaffected by this method call.
* <p>
* The resulting chronology is determined by the chronology of this
* YearMonthDay plus the time zone.
* The chronology of the time is ignored - only the field values are used.
*
* @param time the time of day to use, null means current time
* @return the DateTime instance
*/
public DateTime toDateTime(TimeOfDay time) {
return toDateTime(time, null);
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/**
* Converts this object to a DateTime using a TimeOfDay to fill in the
* missing fields and using the default time zone.
* This instance is immutable and unaffected by this method call.
* <p>
* The resulting chronology is determined by the chronology of this
* YearMonthDay plus the time zone.
* The chronology of the time is ignored - only the field values are used.
*
* @param time the time of day to use, null means current time
* @return the DateTime instance
*/
public DateTime toDateTime(TimeOfDay time) {
return toDateTime(time, null);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/**
* Converts this object to a DateTime using a TimeOfDay to fill in the
* missing fields and using the default time zone.
* This instance is immutable and unaffected by this method call.
* <p>
* The resulting chronology is determined by the chronology of this
* YearMonthDay plus the time zone.
* The chronology of the time is ignored - only the field values are used.
*
* @param time the time of day to use, null means current time
* @return the DateTime instance
*/
public DateTime toDateTime(TimeOfDay time) {
return toDateTime(time, null);
}
代码示例来源:origin: org.joda/com.springsource.org.joda.time
/**
* Converts this object to a DateTime using a TimeOfDay to fill in the
* missing fields and using the default time zone.
* This instance is immutable and unaffected by this method call.
* <p>
* The resulting chronology is determined by the chronology of this
* YearMonthDay plus the time zone.
* The chronology of the time is ignored - only the field values are used.
*
* @param time the time of day to use, null means current time
* @return the DateTime instance
*/
public DateTime toDateTime(TimeOfDay time) {
return toDateTime(time, null);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Converts this object to a DateTime using a TimeOfDay to fill in the
* missing fields and using the default time zone.
* This instance is immutable and unaffected by this method call.
* <p>
* The resulting chronology is determined by the chronology of this
* YearMonthDay plus the time zone.
* The chronology of the time is ignored - only the field values are used.
*
* @param time the time of day to use, null means current time
* @return the DateTime instance
*/
public DateTime toDateTime(TimeOfDay time) {
return toDateTime(time, null);
}
代码示例来源:origin: Nextdoor/bender
/**
* Converts this object to a DateTime using a TimeOfDay to fill in the
* missing fields and using the default time zone.
* This instance is immutable and unaffected by this method call.
* <p>
* The resulting chronology is determined by the chronology of this
* YearMonthDay plus the time zone.
* The chronology of the time is ignored - only the field values are used.
*
* @param time the time of day to use, null means current time
* @return the DateTime instance
*/
public DateTime toDateTime(TimeOfDay time) {
return toDateTime(time, null);
}
代码示例来源:origin: redfish64/TinyTravelTracker
/**
* Converts this object to a DateTime using a TimeOfDay to fill in the
* missing fields and using the default time zone.
* This instance is immutable and unaffected by this method call.
* <p>
* The resulting chronology is determined by the chronology of this
* YearMonthDay plus the time zone.
* The chronology of the time is ignored - only the field values are used.
*
* @param time the time of day to use, null means current time
* @return the DateTime instance
*/
public DateTime toDateTime(TimeOfDay time) {
return toDateTime(time, null);
}
代码示例来源:origin: FenixEdu/fenixedu-academic
protected static Interval createNewInterval(YearMonthDay begin, YearMonthDay end, HourMinuteSecond beginTime,
HourMinuteSecond endTime) {
return new Interval(begin.toDateTime(new TimeOfDay(beginTime.getHour(), beginTime.getMinuteOfHour(), 0, 0)),
end.toDateTime(new TimeOfDay(endTime.getHour(), endTime.getMinuteOfHour(), 0, 0)));
}
代码示例来源:origin: FenixEdu/fenixedu-academic
public DateTime getSummaryDateTime() {
HourMinuteSecond time = getSummaryHourHourMinuteSecond();
return getSummaryDateYearMonthDay().toDateTime(
new TimeOfDay(time.getHour(), time.getMinuteOfHour(), time.getSecondOfMinute(), 0));
}
代码示例来源:origin: FenixEdu/fenixedu-academic
if (!begin.isAfter(end)) {
if (firstInstant) {
return begin.toDateTime(new TimeOfDay(beginTime.getHour(), beginTime.getMinuteOfHour(), 0, 0));
} else {
return end.toDateTime(new TimeOfDay(endTime.getHour(), endTime.getMinuteOfHour(), 0, 0));
DateTime intervalEnd = begin.toDateTime(new TimeOfDay(endTime.getHour(), endTime.getMinuteOfHour(), 0, 0));
if (!frequency.equals(FrequencyType.DAILY)
|| ((dailyFrequencyMarkSaturday || intervalEnd.getDayOfWeek() != SATURDAY_IN_JODA_TIME) && (dailyFrequencyMarkSunday || intervalEnd
return begin.toDateTime(new TimeOfDay(beginTime.getHour(), beginTime.getMinuteOfHour(), 0, 0));
} else {
instantResult = intervalEnd;
内容来源于网络,如有侵权,请联系作者删除!