Example usage for org.joda.time YearMonthDay minusYears

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

Introduction

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

Prototype

public YearMonthDay minusYears(int years) 

Source Link

Document

Returns a copy of this date minus the specified number of years.

Usage

From source file:pt.utl.ist.codeGenerator.database.CreateTestData.java

License:Open Source License

private static String constructExecutionYearString() {
    final YearMonthDay yearMonthDay = new YearMonthDay();
    return yearMonthDay.getMonthOfYear() < 8
            ? constructExecutionYearString(yearMonthDay.minusYears(1), yearMonthDay)
            : constructExecutionYearString(yearMonthDay, yearMonthDay.plusYears(1));
}