Example usage for org.joda.time Period toDurationTo

List of usage examples for org.joda.time Period toDurationTo

Introduction

In this page you can find the example usage for org.joda.time Period toDurationTo.

Prototype

public Duration toDurationTo(ReadableInstant endInstant) 

Source Link

Document

Gets the total millisecond duration of this period relative to an end instant.

Usage

From source file:com.jbirdvegas.mgerrit.search.AgeSearch.java

License:Apache License

protected static Instant getInstantFromPeriod(Period period) {
    Instant now = new Instant();
    Duration duration = period.toDurationTo(now);
    return now.minus(duration);
}