本文整理了Java中org.joda.time.YearMonth.toLocalDate()
方法的一些代码示例,展示了YearMonth.toLocalDate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YearMonth.toLocalDate()
方法的具体详情如下:
包路径:org.joda.time.YearMonth
类名称:YearMonth
方法名:toLocalDate
[英]Converts this object to a LocalDate with the same year-month and chronology.
[中]将此对象转换为具有相同年月和年表的LocalDate。
代码示例来源:origin: joda-time/joda-time
/**
* Converts this object to an Interval representing the whole month.
* <p>
* The interval will use the chronology of the year-month in the specified zone.
* <p>
* This instance is immutable and unaffected by this method call.
*
* @param zone the zone to get the Interval in, null means default
* @return an interval over the month, never null
*/
public Interval toInterval(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone);
DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone);
return new Interval(start, end);
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Converts this object to an Interval representing the whole month.
* <p>
* The interval will use the chronology of the year-month in the specified zone.
* <p>
* This instance is immutable and unaffected by this method call.
*
* @param zone the zone to get the Interval in, null means default
* @return an interval over the month, never null
*/
public Interval toInterval(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone);
DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone);
return new Interval(start, end);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Converts this object to an Interval representing the whole month.
* <p>
* The interval will use the chronology of the year-month in the specified zone.
* <p>
* This instance is immutable and unaffected by this method call.
*
* @param zone the zone to get the Interval in, null means default
* @return an interval over the month, never null
*/
public Interval toInterval(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone);
DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone);
return new Interval(start, end);
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/**
* Converts this object to an Interval representing the whole month.
* <p>
* The interval will use the chronology of the year-month in the specified zone.
* <p>
* This instance is immutable and unaffected by this method call.
*
* @param zone the zone to get the Interval in, null means default
* @return an interval over the month, never null
*/
public Interval toInterval(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone);
DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone);
return new Interval(start, end);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/**
* Converts this object to an Interval representing the whole month.
* <p>
* The interval will use the chronology of the year-month in the specified zone.
* <p>
* This instance is immutable and unaffected by this method call.
*
* @param zone the zone to get the Interval in, null means default
* @return an interval over the month, never null
*/
public Interval toInterval(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone);
DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone);
return new Interval(start, end);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Converts this object to an Interval representing the whole month.
* <p>
* The interval will use the chronology of the year-month in the specified zone.
* <p>
* This instance is immutable and unaffected by this method call.
*
* @param zone the zone to get the Interval in, null means default
* @return an interval over the month, never null
*/
public Interval toInterval(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone);
DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone);
return new Interval(start, end);
}
代码示例来源:origin: redfish64/TinyTravelTracker
/**
* Converts this object to an Interval representing the whole month.
* <p>
* The interval will use the chronology of the year-month in the specified zone.
* <p>
* This instance is immutable and unaffected by this method call.
*
* @param zone the zone to get the Interval in, null means default
* @return an interval over the month, never null
*/
public Interval toInterval(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone);
DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone);
return new Interval(start, end);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time
/**
* Converts this object to an Interval representing the whole month.
* <p>
* The interval will use the chronology of the year-month in the specified zone.
* <p>
* This instance is immutable and unaffected by this method call.
*
* @param zone the zone to get the Interval in, null means default
* @return an interval over the month, never null
*/
public Interval toInterval(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone);
DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone);
return new Interval(start, end);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Converts this object to an Interval representing the whole month.
* <p>
* The interval will use the chronology of the year-month in the specified zone.
* <p>
* This instance is immutable and unaffected by this method call.
*
* @param zone the zone to get the Interval in, null means default
* @return an interval over the month, never null
*/
public Interval toInterval(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone);
DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone);
return new Interval(start, end);
}
代码示例来源:origin: Nextdoor/bender
/**
* Converts this object to an Interval representing the whole month.
* <p>
* The interval will use the chronology of the year-month in the specified zone.
* <p>
* This instance is immutable and unaffected by this method call.
*
* @param zone the zone to get the Interval in, null means default
* @return an interval over the month, never null
*/
public Interval toInterval(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone);
DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone);
return new Interval(start, end);
}
内容来源于网络,如有侵权,请联系作者删除!