Example usage for org.joda.time YearMonthDay monthOfYear

List of usage examples for org.joda.time YearMonthDay monthOfYear

Introduction

In this page you can find the example usage for org.joda.time YearMonthDay monthOfYear.

Prototype

public Property monthOfYear() 

Source Link

Document

Get the month of year field property which provides access to advanced functionality.

Usage

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;
}