本文整理了Java中org.joda.time.YearMonthDay.getYear()
方法的一些代码示例,展示了YearMonthDay.getYear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YearMonthDay.getYear()
方法的具体详情如下:
包路径:org.joda.time.YearMonthDay
类名称:YearMonthDay
方法名:getYear
[英]Get the year field value.
[中]获取年份字段值。
代码示例来源:origin: joda-time/joda-time
/**
* Converts this object to a LocalDate with the same date and chronology.
*
* @return a LocalDate with the same date and chronology
* @since 1.3
*/
public LocalDate toLocalDate() {
return new LocalDate(getYear(), getMonthOfYear(), getDayOfMonth(), getChronology());
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Converts this object to a LocalDate with the same date and chronology.
*
* @return a LocalDate with the same date and chronology
* @since 1.3
*/
public LocalDate toLocalDate() {
return new LocalDate(getYear(), getMonthOfYear(), getDayOfMonth(), getChronology());
}
代码示例来源:origin: joda-time/joda-time
/**
* Converts this YearMonthDay to a full datetime at midnight using the
* specified time zone.
* <p>
* This method uses the chronology from this instance plus the time zone
* specified.
*
* @param zone the zone to use, null means default
* @return this date as a datetime at midnight
*/
public DateTime toDateTimeAtMidnight(DateTimeZone zone) {
Chronology chrono = getChronology().withZone(zone);
return new DateTime(getYear(), getMonthOfYear(), getDayOfMonth(), 0, 0, 0, 0, chrono);
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Converts this YearMonthDay to a full datetime at midnight using the
* specified time zone.
* <p>
* This method uses the chronology from this instance plus the time zone
* specified.
*
* @param zone the zone to use, null means default
* @return this date as a datetime at midnight
*/
public DateTime toDateTimeAtMidnight(DateTimeZone zone) {
Chronology chrono = getChronology().withZone(zone);
return new DateTime(getYear(), getMonthOfYear(), getDayOfMonth(), 0, 0, 0, 0, chrono);
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Converts this object to a DateMidnight.
*
* @param zone the zone to get the DateMidnight in, null means default
* @return the DateMidnight instance
*/
public DateMidnight toDateMidnight(DateTimeZone zone) {
Chronology chrono = getChronology().withZone(zone);
return new DateMidnight(getYear(), getMonthOfYear(), getDayOfMonth(), chrono);
}
代码示例来源:origin: joda-time/joda-time
/**
* Converts this object to a DateMidnight.
*
* @param zone the zone to get the DateMidnight in, null means default
* @return the DateMidnight instance
*/
public DateMidnight toDateMidnight(DateTimeZone zone) {
Chronology chrono = getChronology().withZone(zone);
return new DateMidnight(getYear(), getMonthOfYear(), getDayOfMonth(), chrono);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Converts this object to a LocalDate with the same date and chronology.
*
* @return a LocalDate with the same date and chronology
* @since 1.3
*/
public LocalDate toLocalDate() {
return new LocalDate(getYear(), getMonthOfYear(), getDayOfMonth(), getChronology());
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Converts this YearMonthDay to a full datetime at midnight using the
* specified time zone.
* <p>
* This method uses the chronology from this instance plus the time zone
* specified.
*
* @param zone the zone to use, null means default
* @return this date as a datetime at midnight
*/
public DateTime toDateTimeAtMidnight(DateTimeZone zone) {
Chronology chrono = getChronology().withZone(zone);
return new DateTime(getYear(), getMonthOfYear(), getDayOfMonth(), 0, 0, 0, 0, chrono);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Converts this object to a DateMidnight.
*
* @param zone the zone to get the DateMidnight in, null means default
* @return the DateMidnight instance
*/
public DateMidnight toDateMidnight(DateTimeZone zone) {
Chronology chrono = getChronology().withZone(zone);
return new DateMidnight(getYear(), getMonthOfYear(), getDayOfMonth(), chrono);
}
代码示例来源:origin: FenixEdu/fenixedu-academic
@Deprecated
public java.util.Date getModification() {
org.joda.time.YearMonthDay ymd = getModificationYearMonthDay();
return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
}
代码示例来源:origin: FenixEdu/fenixedu-academic
@Deprecated
public java.util.Date getEnrollmentBeginDayDate() {
org.joda.time.YearMonthDay ymd = getEnrollmentBeginDayDateYearMonthDay();
return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
}
代码示例来源:origin: FenixEdu/fenixedu-academic
@Deprecated
public java.util.Date getSubmitDate() {
org.joda.time.YearMonthDay ymd = getSubmitDateYearMonthDay();
return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
}
代码示例来源:origin: FenixEdu/fenixedu-academic
@Deprecated
public java.util.Date getEndPayment() {
org.joda.time.YearMonthDay ymd = getEndPaymentYearMonthDay();
return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
}
代码示例来源:origin: FenixEdu/fenixedu-academic
@Deprecated
public java.util.Date getBegin() {
org.joda.time.YearMonthDay ymd = getBeginYearMonthDay();
return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
}
代码示例来源:origin: FenixEdu/fenixedu-academic
@Deprecated
public java.util.Date getCreation() {
org.joda.time.YearMonthDay ymd = getCreationYearMonthDay();
return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
}
代码示例来源:origin: FenixEdu/fenixedu-academic
@Deprecated
public java.util.Date getDateOfBirth() {
org.joda.time.YearMonthDay ymd = getDateOfBirthYearMonthDay();
return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
}
代码示例来源:origin: FenixEdu/fenixedu-academic
private void add(final ExecutionYear executionYear) {
final Integer year1 = executionYear.getBeginDateYearMonthDay().getYear();
final Integer year2 = executionYear.getEndDateYearMonthDay().getYear();
add(executionYear, year1);
add(executionYear, year2);
}
代码示例来源:origin: Nextdoor/bender
/**
* Converts this object to a LocalDate with the same date and chronology.
*
* @return a LocalDate with the same date and chronology
* @since 1.3
*/
public LocalDate toLocalDate() {
return new LocalDate(getYear(), getMonthOfYear(), getDayOfMonth(), getChronology());
}
代码示例来源:origin: redfish64/TinyTravelTracker
/**
* Converts this object to a DateMidnight.
*
* @param zone the zone to get the DateMidnight in, null means default
* @return the DateMidnight instance
*/
public DateMidnight toDateMidnight(DateTimeZone zone) {
Chronology chrono = getChronology().withZone(zone);
return new DateMidnight(getYear(), getMonthOfYear(), getDayOfMonth(), chrono);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Converts this object to a DateMidnight.
*
* @param zone the zone to get the DateMidnight in, null means default
* @return the DateMidnight instance
*/
public DateMidnight toDateMidnight(DateTimeZone zone) {
Chronology chrono = getChronology().withZone(zone);
return new DateMidnight(getYear(), getMonthOfYear(), getDayOfMonth(), chrono);
}
内容来源于网络,如有侵权,请联系作者删除!