Java org.joda.time Period fields, constructors, methods, implement or subclass

Example usage for Java org.joda.time Period fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.joda.time Period.

The text is from its open source code.

Subclass

org.joda.time.Period has subclasses.
Click this link to see all its subclasses.

Implementation

org.joda.time.Period has the following implementations.
Click this link to see all its implementation.

Field

PeriodZERO
A period of zero length and standard period type.

Constructor

Period(long duration)
Creates a period from the given millisecond duration using the standard set of fields.
Period(Object period)
Creates a period by converting or copying from another object.
Period(long duration, PeriodType type)
Creates a period from the given millisecond duration.
Period(long duration, Chronology chronology)
Creates a period from the given millisecond duration using the standard set of fields.
Period(long startInstant, long endInstant)
Creates a period from the given interval endpoints using the standard set of fields.
Period(ReadableInstant startInstant, ReadableInstant endInstant)
Creates a period between the given instants using the standard set of fields.
Period(ReadablePartial start, ReadablePartial end)
Creates a period from two partially specified times.
Period(ReadableInstant startInstant, ReadableDuration duration)
Creates a period from the given start point and the duration.
Period(ReadableDuration duration, ReadableInstant endInstant)
Creates a period from the given duration and end point.
Period(Object period, PeriodType type)
Creates a period by converting or copying from another object.
Period(Object period, Chronology chrono)
Creates a period by converting or copying from another object.
Period(int[] values, PeriodType type)
Constructor used when we trust ourselves.
Period(long duration, PeriodType type, Chronology chronology)
Creates a period from the given millisecond duration.
Period(long startInstant, long endInstant, PeriodType type)
Creates a period from the given interval endpoints.
Period(long startInstant, long endInstant, Chronology chrono)
Creates a period from the given interval endpoints using the standard set of fields.
Period(ReadableInstant startInstant, ReadableInstant endInstant, PeriodType type)
Creates a period between the given instants.
Period(ReadablePartial start, ReadablePartial end, PeriodType type)
Creates a period from two partially specified times.
Period(ReadableInstant startInstant, ReadableDuration duration, PeriodType type)
Creates a period from the given start point and the duration.
Period(ReadableDuration duration, ReadableInstant endInstant, PeriodType type)
Creates a period from the given duration and end point.
Period(Object period, PeriodType type, Chronology chrono)
Creates a period by converting or copying from another object.
Period()
Creates a new empty period with the standard set of fields.
Period(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis)
Create a period from a set of field values using the standard set of fields.
Period(int hours, int minutes, int seconds, int millis)
Create a period from a set of field values using the standard set of fields.
Period(long startInstant, long endInstant, PeriodType type, Chronology chrono)
Creates a period from the given interval endpoints.
Period(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis, PeriodType type)
Create a period from a set of field values.

Method

Perioddays(int days)
Create a period with a specified number of days.
booleanequals(Object period)
Compares this object with the specified object for equality based on the value of each field.
intget(DurationFieldType type)
Gets the value of one of the fields.
intgetDays()
Gets the days field part of the period.
DurationFieldType[]getFieldTypes()
Gets an array of the field types that this period supports.
intgetHours()
Gets the hours field part of the period.
intgetMillis()
Gets the millis field part of the period.
intgetMinutes()
Gets the minutes field part of the period.
intgetMonths()
Gets the months field part of the period.
PeriodTypegetPeriodType()
Gets the period type.
intgetSeconds()
Gets the seconds field part of the period.
intgetValue(int index)
Gets the value at the specified index.
int[]getValues()
Gets an array of the value of each of the fields that this period supports.
intgetWeeks()
Gets the weeks field part of the period.
intgetYears()
Gets the years field part of the period.
Periodhours(int hours)
Create a period with a specified number of hours.
Periodmillis(int millis)
Create a period with a specified number of millis.
Periodminus(ReadablePeriod period)
Returns a new period with the specified period subtracted.
PeriodminusMillis(int millis)
Returns a new period minus the specified number of millis taken away.
PeriodminusMonths(int months)
Returns a new period minus the specified number of months taken away.
PeriodminusYears(int years)
Returns a new period with the specified number of years taken away.
Periodminutes(int minutes)
Create a period with a specified number of minutes.
Periodmonths(int months)
Create a period with a specified number of months.
Periodnegated()
Returns a new instance with each amount in this period negated.
PeriodnormalizedStandard()
Normalizes this period using standard rules, assuming a 12 month year, 7 day week, 24 hour day, 60 minute hour and 60 second minute.
PeriodnormalizedStandard(PeriodType type)
Normalizes this period using standard rules, assuming a 12 month year, 7 day week, 24 hour day, 60 minute hour and 60 second minute, providing control over how the result is split into fields.
Periodparse(String str)
Parses a Period from the specified string.
Periodparse(String str, PeriodFormatter formatter)
Parses a Period from the specified string using a formatter.
Periodplus(ReadablePeriod period)
Returns a new period with the specified period added.
PeriodplusDays(int days)
Returns a new period plus the specified number of days added.
PeriodplusHours(int hours)
Returns a new period plus the specified number of hours added.
PeriodplusMillis(int millis)
Returns a new period plus the specified number of millis added.
PeriodplusMinutes(int minutes)
Returns a new period plus the specified number of minutes added.
PeriodplusMonths(int months)
Returns a new period plus the specified number of months added.
PeriodplusSeconds(int seconds)
Returns a new period plus the specified number of seconds added.
PeriodplusWeeks(int weeks)
Returns a new period plus the specified number of weeks added.
PeriodplusYears(int years)
Returns a new period with the specified number of years added.
Periodseconds(int seconds)
Create a period with a specified number of seconds.
DurationtoDurationFrom(ReadableInstant startInstant)
Gets the total millisecond duration of this period relative to a start instant.
DurationtoDurationTo(ReadableInstant endInstant)
Gets the total millisecond duration of this period relative to an end instant.
MutablePeriodtoMutablePeriod()
Get this object as a MutablePeriod.
DaystoStandardDays()
Converts this period to a period in days assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute.
DurationtoStandardDuration()
Converts this period to a duration assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute.
HourstoStandardHours()
Converts this period to a period in hours assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute.
MinutestoStandardMinutes()
Converts this period to a period in minutes assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute.
SecondstoStandardSeconds()
Converts this period to a period in seconds assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute.
WeekstoStandardWeeks()
Converts this period to a period in weeks assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute.
StringtoString()
Gets the value as a String in the ISO8601 duration format.
StringtoString(PeriodFormatter formatter)
Uses the specified formatter to convert this period to a String.
Periodweeks(int weeks)
Create a period with a specified number of weeks.
PeriodwithDays(int days)
Returns a new period with the specified number of days.
PeriodwithFieldAdded(DurationFieldType field, int value)
Creates a new Period instance with the valueToAdd added to the specified field.
PeriodwithHours(int hours)
Returns a new period with the specified number of hours.
PeriodwithMillis(int millis)
Returns a new period with the specified number of millis.
PeriodwithMinutes(int minutes)
Returns a new period with the specified number of minutes.
PeriodwithMonths(int months)
Returns a new period with the specified number of months.
PeriodwithPeriodType(PeriodType type)
Creates a new Period instance with the same field values but different PeriodType.
PeriodwithSeconds(int seconds)
Returns a new period with the specified number of seconds.
PeriodwithWeeks(int weeks)
Returns a new period with the specified number of weeks.
PeriodwithYears(int years)
Returns a new period with the specified number of years.
Periodyears(int years)
Create a period with a specified number of years.