下面列出了怎么用org.joda.time.field.PreciseDateTimeField的API类实例代码及写法,或者点击链接到github查看源代码。
/**
* @param daysInYear The number of days in each year
*/
protected FixedYearLengthChronology(int daysInYear) {
this.daysInYear = daysInYear;
this.yearDuration = new PreciseDurationField(DurationFieldType.years(), daysInYear * dayDuration.getUnitMillis());
this.centuryDuration = new PreciseDurationField(DurationFieldType.centuries(), 100 * yearDuration.getUnitMillis());
this.dayOfYear = new OneBasedPreciseDateTimeField(DateTimeFieldType.dayOfYear(), dayDuration, this.yearDuration);
this.yearOfCentury =
new PreciseDateTimeField(DateTimeFieldType.yearOfCentury(), this.yearDuration, this.centuryDuration);
this.year = new YearField(this.yearDuration);
}