List of usage examples for org.joda.time YearMonthDay monthOfYear
public Property monthOfYear()
From source file:net.sourceforge.fenixedu.domain.Tutorship.java
License:Open Source License
public boolean isActive() { if (!getStudent().isActive()) { return false; }//from www .j av a2s. c o m if (!this.hasEndDate()) { return false; } YearMonthDay currentYearMonthDay = new YearMonthDay(); Partial currentDate = new Partial( new DateTimeFieldType[] { DateTimeFieldType.year(), DateTimeFieldType.monthOfYear() }, new int[] { currentYearMonthDay.year().get(), currentYearMonthDay.monthOfYear().get() }); if (getEndDate().isAfter(currentDate)) { return true; } return false; }