Example usage for Java org.joda.time Period fields, constructors, methods, implement or subclass
The text is from its open source code.
Period | ZERO A period of zero length and standard period type. |
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. |
Period | days(int days) Create a period with a specified number of days. |
boolean | equals(Object period) Compares this object with the specified object for equality based on the value of each field. |
int | get(DurationFieldType type) Gets the value of one of the fields. |
int | getDays() Gets the days field part of the period. |
DurationFieldType[] | getFieldTypes() Gets an array of the field types that this period supports. |
int | getHours() Gets the hours field part of the period. |
int | getMillis() Gets the millis field part of the period. |
int | getMinutes() Gets the minutes field part of the period. |
int | getMonths() Gets the months field part of the period. |
PeriodType | getPeriodType() Gets the period type. |
int | getSeconds() Gets the seconds field part of the period. |
int | getValue(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. |
int | getWeeks() Gets the weeks field part of the period. |
int | getYears() Gets the years field part of the period. |
Period | hours(int hours) Create a period with a specified number of hours. |
Period | millis(int millis) Create a period with a specified number of millis. |
Period | minus(ReadablePeriod period) Returns a new period with the specified period subtracted. |
Period | minusMillis(int millis) Returns a new period minus the specified number of millis taken away. |
Period | minusMonths(int months) Returns a new period minus the specified number of months taken away. |
Period | minusYears(int years) Returns a new period with the specified number of years taken away. |
Period | minutes(int minutes) Create a period with a specified number of minutes. |
Period | months(int months) Create a period with a specified number of months. |
Period | negated() Returns a new instance with each amount in this period negated. |
Period | normalizedStandard() Normalizes this period using standard rules, assuming a 12 month year, 7 day week, 24 hour day, 60 minute hour and 60 second minute. |
Period | normalizedStandard(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. |
Period | parse(String str) Parses a Period from the specified string. |
Period | parse(String str, PeriodFormatter formatter) Parses a Period from the specified string using a formatter. |
Period | plus(ReadablePeriod period) Returns a new period with the specified period added. |
Period | plusDays(int days) Returns a new period plus the specified number of days added. |
Period | plusHours(int hours) Returns a new period plus the specified number of hours added. |
Period | plusMillis(int millis) Returns a new period plus the specified number of millis added. |
Period | plusMinutes(int minutes) Returns a new period plus the specified number of minutes added. |
Period | plusMonths(int months) Returns a new period plus the specified number of months added. |
Period | plusSeconds(int seconds) Returns a new period plus the specified number of seconds added. |
Period | plusWeeks(int weeks) Returns a new period plus the specified number of weeks added. |
Period | plusYears(int years) Returns a new period with the specified number of years added. |
Period | seconds(int seconds) Create a period with a specified number of seconds. |
Duration | toDurationFrom(ReadableInstant startInstant) Gets the total millisecond duration of this period relative to a start instant. |
Duration | toDurationTo(ReadableInstant endInstant) Gets the total millisecond duration of this period relative to an end instant. |
MutablePeriod | toMutablePeriod() Get this object as a MutablePeriod . |
Days | toStandardDays() Converts this period to a period in days assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute. |
Duration | toStandardDuration() Converts this period to a duration assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute. |
Hours | toStandardHours() Converts this period to a period in hours assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute. |
Minutes | toStandardMinutes() Converts this period to a period in minutes assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute. |
Seconds | toStandardSeconds() Converts this period to a period in seconds assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute. |
Weeks | toStandardWeeks() Converts this period to a period in weeks assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute. |
String | toString() Gets the value as a String in the ISO8601 duration format. |
String | toString(PeriodFormatter formatter) Uses the specified formatter to convert this period to a String. |
Period | weeks(int weeks) Create a period with a specified number of weeks. |
Period | withDays(int days) Returns a new period with the specified number of days. |
Period | withFieldAdded(DurationFieldType field, int value) Creates a new Period instance with the valueToAdd added to the specified field. |
Period | withHours(int hours) Returns a new period with the specified number of hours. |
Period | withMillis(int millis) Returns a new period with the specified number of millis. |
Period | withMinutes(int minutes) Returns a new period with the specified number of minutes. |
Period | withMonths(int months) Returns a new period with the specified number of months. |
Period | withPeriodType(PeriodType type) Creates a new Period instance with the same field values but different PeriodType. |
Period | withSeconds(int seconds) Returns a new period with the specified number of seconds. |
Period | withWeeks(int weeks) Returns a new period with the specified number of weeks. |
Period | withYears(int years) Returns a new period with the specified number of years. |
Period | years(int years) Create a period with a specified number of years. |