Uses of Interface
org.joda.time.ReadablePeriod
-
Packages that use ReadablePeriod Package Description org.joda.time Provides support for dates, times, time zones, durations, intervals, and partials.org.joda.time.base Implementation package providing abstract and base time classes.org.joda.time.chrono Package containing the chronology classes which define the calendar systems.org.joda.time.format Provides printing and parsing support for instants and durations. -
-
Uses of ReadablePeriod in org.joda.time
Subinterfaces of ReadablePeriod in org.joda.time Modifier and Type Interface Description interface
ReadWritablePeriod
Defines a duration of time that can be queried and modified using datetime fields.Classes in org.joda.time that implement ReadablePeriod Modifier and Type Class Description class
Days
An immutable time period representing a number of days.class
Hours
An immutable time period representing a number of hours.class
Minutes
An immutable time period representing a number of minutes.class
Months
An immutable time period representing a number of months.class
MutablePeriod
Standard mutable time period implementation.class
Period
An immutable time period specifying a set of duration field values.class
Seconds
An immutable time period representing a number of seconds.class
Weeks
An immutable time period representing a number of weeks.class
Years
An immutable time period representing a number of years.Methods in org.joda.time with parameters of type ReadablePeriod Modifier and Type Method Description abstract long
Chronology. add(ReadablePeriod period, long instant, int scalar)
Adds the period to the instant, specifying the number of times to add.void
MutableDateTime. add(ReadablePeriod period)
Adds a period to this instant.void
MutableDateTime. add(ReadablePeriod period, int scalar)
Adds a period to this instant specifying how many times to add.void
MutablePeriod. add(ReadablePeriod period)
Adds a period to this one by adding each field in turn.void
ReadWritableInstant. add(ReadablePeriod period)
Adds a period to this instant.void
ReadWritableInstant. add(ReadablePeriod period, int scalar)
Adds a period to this instant specifying how many times to add.void
ReadWritablePeriod. add(ReadablePeriod period)
Adds a period to this one by adding each field in turn.(package private) boolean
PeriodType. addIndexedField(ReadablePeriod period, int index, int[] values, int valueToAdd)
Adds to the indexed field part of the period.abstract int[]
Chronology. get(ReadablePeriod period, long duration)
Gets the values of a period from an interval.abstract int[]
Chronology. get(ReadablePeriod period, long startInstant, long endInstant)
Gets the values of a period from an interval.(package private) int
PeriodType. getIndexedField(ReadablePeriod period, int index)
Gets the indexed field part of the period.void
MutablePeriod. mergePeriod(ReadablePeriod period)
Merges all the fields from the specified period into this one.DateMidnight
DateMidnight. minus(ReadablePeriod period)
Deprecated.Returns a copy of this date with the specified period taken away.DateTime
DateTime. minus(ReadablePeriod period)
Returns a copy of this datetime with the specified period taken away.LocalDate
LocalDate. minus(ReadablePeriod period)
Returns a copy of this date with the specified period taken away.LocalDateTime
LocalDateTime. minus(ReadablePeriod period)
Returns a copy of this datetime with the specified period taken away.LocalTime
LocalTime. minus(ReadablePeriod period)
Returns a copy of this time with the specified period taken away.MonthDay
MonthDay. minus(ReadablePeriod period)
Returns a copy of this month-day with the specified period taken away.Partial
Partial. minus(ReadablePeriod period)
Gets a copy of this instance with the specified period take away.Period
Period. minus(ReadablePeriod period)
Returns a new period with the specified period subtracted.TimeOfDay
TimeOfDay. minus(ReadablePeriod period)
Deprecated.Returns a copy of this time with the specified period taken away, wrapping to what would be a new day if required.YearMonth
YearMonth. minus(ReadablePeriod period)
Returns a copy of this year-month with the specified period taken away.YearMonthDay
YearMonthDay. minus(ReadablePeriod period)
Deprecated.Returns a copy of this date with the specified period taken away.DateMidnight
DateMidnight. plus(ReadablePeriod period)
Deprecated.Returns a copy of this date with the specified period added.DateTime
DateTime. plus(ReadablePeriod period)
Returns a copy of this datetime with the specified period added.LocalDate
LocalDate. plus(ReadablePeriod period)
Returns a copy of this date with the specified period added.LocalDateTime
LocalDateTime. plus(ReadablePeriod period)
Returns a copy of this datetime with the specified period added.LocalTime
LocalTime. plus(ReadablePeriod period)
Returns a copy of this time with the specified period added.MonthDay
MonthDay. plus(ReadablePeriod period)
Returns a copy of this month-day with the specified period added.Partial
Partial. plus(ReadablePeriod period)
Gets a copy of this instance with the specified period added.Period
Period. plus(ReadablePeriod period)
Returns a new period with the specified period added.TimeOfDay
TimeOfDay. plus(ReadablePeriod period)
Deprecated.Returns a copy of this time with the specified period added, wrapping to what would be a new day if required.YearMonth
YearMonth. plus(ReadablePeriod period)
Returns a copy of this year-month with the specified period added.YearMonthDay
YearMonthDay. plus(ReadablePeriod period)
Deprecated.Returns a copy of this date with the specified period added.(package private) boolean
PeriodType. setIndexedField(ReadablePeriod period, int index, int[] values, int newValue)
Sets the indexed field part of the period.void
MutablePeriod. setPeriod(ReadablePeriod period)
Sets all the fields in one go from another ReadablePeriod.void
ReadWritablePeriod. setPeriod(ReadablePeriod period)
Sets all the fields in one go from another ReadablePeriod.void
MutableInterval. setPeriodAfterStart(ReadablePeriod period)
Sets the period of this time interval, preserving the start instant and using the ISOChronology in the default zone for calculations.void
ReadWritableInterval. setPeriodAfterStart(ReadablePeriod period)
Sets the period of this time interval, preserving the start instant.void
MutableInterval. setPeriodBeforeEnd(ReadablePeriod period)
Sets the period of this time interval, preserving the end instant and using the ISOChronology in the default zone for calculations.void
ReadWritableInterval. setPeriodBeforeEnd(ReadablePeriod period)
Sets the period of this time interval, preserving the end instant.static Days
Days. standardDaysIn(ReadablePeriod period)
Creates a newDays
representing the number of complete standard length days in the specified period.static Hours
Hours. standardHoursIn(ReadablePeriod period)
Creates a newHours
representing the number of complete standard length hours in the specified period.static Minutes
Minutes. standardMinutesIn(ReadablePeriod period)
Creates a newMinutes
representing the number of complete standard length minutes in the specified period.static Seconds
Seconds. standardSecondsIn(ReadablePeriod period)
Creates a newSeconds
representing the number of complete standard length seconds in the specified period.static Weeks
Weeks. standardWeeksIn(ReadablePeriod period)
Creates a newWeeks
representing the number of complete standard length weeks in the specified period.Period
Period. withFields(ReadablePeriod period)
Creates a new Period instance with the fields from the specified period copied on top of those from this period.DateMidnight
DateMidnight. withPeriodAdded(ReadablePeriod period, int scalar)
Deprecated.Returns a copy of this date with the specified period added.DateTime
DateTime. withPeriodAdded(ReadablePeriod period, int scalar)
Returns a copy of this datetime with the specified period added.LocalDate
LocalDate. withPeriodAdded(ReadablePeriod period, int scalar)
Returns a copy of this date with the specified period added.LocalDateTime
LocalDateTime. withPeriodAdded(ReadablePeriod period, int scalar)
Returns a copy of this datetime with the specified period added.LocalTime
LocalTime. withPeriodAdded(ReadablePeriod period, int scalar)
Returns a copy of this time with the specified period added.MonthDay
MonthDay. withPeriodAdded(ReadablePeriod period, int scalar)
Returns a copy of this month-day with the specified period added.Partial
Partial. withPeriodAdded(ReadablePeriod period, int scalar)
Gets a copy of this Partial with the specified period added.TimeOfDay
TimeOfDay. withPeriodAdded(ReadablePeriod period, int scalar)
Deprecated.Returns a copy of this time with the specified period added, wrapping to what would be a new day if required.YearMonth
YearMonth. withPeriodAdded(ReadablePeriod period, int scalar)
Returns a copy of this year-month with the specified period added.YearMonthDay
YearMonthDay. withPeriodAdded(ReadablePeriod period, int scalar)
Deprecated.Returns a copy of this date with the specified period added.Interval
Interval. withPeriodAfterStart(ReadablePeriod period)
Creates a new interval with the specified period after the start instant.Interval
Interval. withPeriodBeforeEnd(ReadablePeriod period)
Creates a new interval with the specified period before the end instant.Constructors in org.joda.time with parameters of type ReadablePeriod Constructor Description Interval(ReadableInstant start, ReadablePeriod period)
Constructs an interval from a start instant and a time period.Interval(ReadablePeriod period, ReadableInstant end)
Constructs an interval from a time period and an end instant.MutableInterval(ReadableInstant start, ReadablePeriod period)
Constructs an interval from a start instant and a time period.MutableInterval(ReadablePeriod period, ReadableInstant end)
Constructs an interval from a time period and an end instant. -
Uses of ReadablePeriod in org.joda.time.base
Classes in org.joda.time.base that implement ReadablePeriod Modifier and Type Class Description class
AbstractPeriod
AbstractPeriod provides the common behaviour for period classes.class
BasePeriod
BasePeriod is an abstract implementation of ReadablePeriod that stores data in aPeriodType
and anint[]
.class
BaseSingleFieldPeriod
BaseSingleFieldPeriod is an abstract implementation of ReadablePeriod that manages a single duration field, such as days or minutes.Fields in org.joda.time.base declared as ReadablePeriod Modifier and Type Field Description private static ReadablePeriod
BasePeriod. DUMMY_PERIOD
Serialization versionMethods in org.joda.time.base with parameters of type ReadablePeriod Modifier and Type Method Description protected void
BasePeriod. addPeriod(ReadablePeriod period)
Adds the fields from another period.protected int[]
BasePeriod. addPeriodInto(int[] values, ReadablePeriod period)
Adds the fields from another period.protected static int
BaseSingleFieldPeriod. between(ReadablePartial start, ReadablePartial end, ReadablePeriod zeroInstance)
Calculates the number of whole units between the two specified partial datetimes.protected void
BasePeriod. mergePeriod(ReadablePeriod period)
Merges the fields from another period.protected int[]
BasePeriod. mergePeriodInto(int[] values, ReadablePeriod period)
Merges the fields from another period.protected void
BasePeriod. setPeriod(ReadablePeriod period)
Sets all the fields of this period from another.private void
BasePeriod. setPeriodInternal(ReadablePeriod period)
Private method called from constructor.protected static int
BaseSingleFieldPeriod. standardPeriodIn(ReadablePeriod period, long millisPerUnit)
Creates a new instance representing the number of complete standard length units in the specified period.Constructors in org.joda.time.base with parameters of type ReadablePeriod Constructor Description BaseInterval(ReadableInstant start, ReadablePeriod period)
Constructs an interval from a start instant and a time period.BaseInterval(ReadablePeriod period, ReadableInstant end)
Constructs an interval from a time period and an end instant. -
Uses of ReadablePeriod in org.joda.time.chrono
Methods in org.joda.time.chrono with parameters of type ReadablePeriod Modifier and Type Method Description long
BaseChronology. add(ReadablePeriod period, long instant, int scalar)
Adds the period to the instant, specifying the number of times to add.int[]
BaseChronology. get(ReadablePeriod period, long duration)
Gets the values of a period from an interval.int[]
BaseChronology. get(ReadablePeriod period, long startInstant, long endInstant)
Gets the values of a period from an interval. -
Uses of ReadablePeriod in org.joda.time.format
Methods in org.joda.time.format with parameters of type ReadablePeriod Modifier and Type Method Description int
PeriodFormat.DynamicWordBased. calculatePrintedLength(ReadablePeriod period, java.util.Locale locale)
int
PeriodFormatterBuilder.Composite. calculatePrintedLength(ReadablePeriod period, java.util.Locale locale)
int
PeriodFormatterBuilder.FieldFormatter. calculatePrintedLength(ReadablePeriod period, java.util.Locale locale)
int
PeriodFormatterBuilder.Literal. calculatePrintedLength(ReadablePeriod period, java.util.Locale locale)
int
PeriodFormatterBuilder.Separator. calculatePrintedLength(ReadablePeriod period, java.util.Locale locale)
int
PeriodPrinter. calculatePrintedLength(ReadablePeriod period, java.util.Locale locale)
Returns the exact number of characters produced for the given period.private void
PeriodFormatter. checkPeriod(ReadablePeriod period)
Checks whether the period is non-null.int
PeriodFormat.DynamicWordBased. countFieldsToPrint(ReadablePeriod period, int stopAt, java.util.Locale locale)
int
PeriodFormatterBuilder.Composite. countFieldsToPrint(ReadablePeriod period, int stopAt, java.util.Locale locale)
int
PeriodFormatterBuilder.FieldFormatter. countFieldsToPrint(ReadablePeriod period, int stopAt, java.util.Locale locale)
int
PeriodFormatterBuilder.Literal. countFieldsToPrint(ReadablePeriod period, int stopAt, java.util.Locale locale)
int
PeriodFormatterBuilder.Separator. countFieldsToPrint(ReadablePeriod period, int stopAt, java.util.Locale locale)
int
PeriodPrinter. countFieldsToPrint(ReadablePeriod period, int stopAt, java.util.Locale locale)
Returns the amount of fields from the given period that this printer will print.(package private) long
PeriodFormatterBuilder.FieldFormatter. getFieldValue(ReadablePeriod period)
(package private) boolean
PeriodFormatterBuilder.FieldFormatter. isZero(ReadablePeriod period)
java.lang.String
PeriodFormatter. print(ReadablePeriod period)
Prints a ReadablePeriod to a new String.void
PeriodFormat.DynamicWordBased. printTo(java.io.Writer out, ReadablePeriod period, java.util.Locale locale)
void
PeriodFormat.DynamicWordBased. printTo(java.lang.StringBuffer buf, ReadablePeriod period, java.util.Locale locale)
void
PeriodFormatter. printTo(java.io.Writer out, ReadablePeriod period)
Prints a ReadablePeriod to a Writer.void
PeriodFormatter. printTo(java.lang.StringBuffer buf, ReadablePeriod period)
Prints a ReadablePeriod to a StringBuffer.void
PeriodFormatterBuilder.Composite. printTo(java.io.Writer out, ReadablePeriod period, java.util.Locale locale)
void
PeriodFormatterBuilder.Composite. printTo(java.lang.StringBuffer buf, ReadablePeriod period, java.util.Locale locale)
void
PeriodFormatterBuilder.FieldFormatter. printTo(java.io.Writer out, ReadablePeriod period, java.util.Locale locale)
void
PeriodFormatterBuilder.FieldFormatter. printTo(java.lang.StringBuffer buf, ReadablePeriod period, java.util.Locale locale)
void
PeriodFormatterBuilder.Literal. printTo(java.io.Writer out, ReadablePeriod period, java.util.Locale locale)
void
PeriodFormatterBuilder.Literal. printTo(java.lang.StringBuffer buf, ReadablePeriod period, java.util.Locale locale)
void
PeriodFormatterBuilder.Separator. printTo(java.io.Writer out, ReadablePeriod period, java.util.Locale locale)
void
PeriodFormatterBuilder.Separator. printTo(java.lang.StringBuffer buf, ReadablePeriod period, java.util.Locale locale)
void
PeriodPrinter. printTo(java.io.Writer out, ReadablePeriod period, java.util.Locale locale)
Prints a ReadablePeriod to a Writer.void
PeriodPrinter. printTo(java.lang.StringBuffer buf, ReadablePeriod period, java.util.Locale locale)
Prints a ReadablePeriod to a StringBuffer.
-