Uses of Class
org.joda.time.PeriodType
Packages that use PeriodType
Package
Description
Provides support for dates, times, time zones, durations, intervals, and
partials.
Implementation package providing abstract and base time classes.
Implementation package providing conversion between date and time objects.
Provides printing and parsing support for instants and durations.
-
Uses of PeriodType in org.joda.time
Methods in org.joda.time that return PeriodTypeModifier and TypeMethodDescriptionstatic PeriodType
PeriodType.days()
Gets a type that defines just the days field.static PeriodType
PeriodType.dayTime()
Gets a type that defines all standard fields from days downwards.static PeriodType
PeriodType.forFields
(DurationFieldType[] types) Gets a period type that contains the duration types of the array.static final PeriodType
DateTimeUtils.getPeriodType
(PeriodType type) Gets the period type handling null.Days.getPeriodType()
Gets the period type, which isdays
.Hours.getPeriodType()
Gets the period type, which ishours
.Minutes.getPeriodType()
Gets the period type, which isminutes
.Months.getPeriodType()
Gets the period type, which ismonths
.ReadablePeriod.getPeriodType()
Gets the period type that defines which fields are included in the period.Seconds.getPeriodType()
Gets the period type, which isseconds
.Weeks.getPeriodType()
Gets the period type, which isweeks
.Years.getPeriodType()
Gets the period type, which isyears
.static PeriodType
PeriodType.hours()
Gets a type that defines just the hours field.static PeriodType
PeriodType.millis()
Gets a type that defines just the millis field.static PeriodType
PeriodType.minutes()
Gets a type that defines just the minutes field.static PeriodType
PeriodType.months()
Gets a type that defines just the months field.static PeriodType
PeriodType.seconds()
Gets a type that defines just the seconds field.static PeriodType
PeriodType.standard()
Gets a type that defines all standard fields.static PeriodType
PeriodType.time()
Gets a type that defines all standard time fields.static PeriodType
PeriodType.weeks()
Gets a type that defines just the weeks field.PeriodType.withDaysRemoved()
Returns a version of this PeriodType instance that does not support days.PeriodType.withHoursRemoved()
Returns a version of this PeriodType instance that does not support hours.PeriodType.withMillisRemoved()
Returns a version of this PeriodType instance that does not support milliseconds.PeriodType.withMinutesRemoved()
Returns a version of this PeriodType instance that does not support minutes.PeriodType.withMonthsRemoved()
Returns a version of this PeriodType instance that does not support months.PeriodType.withSecondsRemoved()
Returns a version of this PeriodType instance that does not support seconds.PeriodType.withWeeksRemoved()
Returns a version of this PeriodType instance that does not support weeks.PeriodType.withYearsRemoved()
Returns a version of this PeriodType instance that does not support years.static PeriodType
PeriodType.yearDay()
Gets a type that defines the year and day fields.static PeriodType
PeriodType.yearDayTime()
Gets a type that defines all standard fields except months and weeks.static PeriodType
PeriodType.yearMonthDay()
Gets a type that defines the year, month and day fields.static PeriodType
PeriodType.yearMonthDayTime()
Gets a type that defines all standard fields except weeks.static PeriodType
PeriodType.years()
Gets a type that defines just the years field.static PeriodType
PeriodType.yearWeekDay()
Gets a type that defines year, week and day fields.static PeriodType
PeriodType.yearWeekDayTime()
Gets a type that defines all standard fields except months.Methods in org.joda.time with parameters of type PeriodTypeModifier and TypeMethodDescriptionstatic final PeriodType
DateTimeUtils.getPeriodType
(PeriodType type) Gets the period type handling null.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.ReadableInterval.toPeriod
(PeriodType type) Converts the duration of the interval to a period using the specified period type.Period.withPeriodType
(PeriodType type) Creates a new Period instance with the same field values but different PeriodType.Constructors in org.joda.time with parameters of type PeriodTypeModifierConstructorDescriptionMutablePeriod
(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.MutablePeriod
(long startInstant, long endInstant, PeriodType type) Creates a period from the given interval endpoints.MutablePeriod
(long startInstant, long endInstant, PeriodType type, Chronology chrono) Creates a period from the given interval endpoints.MutablePeriod
(long duration, PeriodType type) Creates a period from the given millisecond duration.MutablePeriod
(long duration, PeriodType type, Chronology chronology) Creates a period from the given millisecond duration.MutablePeriod
(Object period, PeriodType type) Creates a period by converting or copying from another object.MutablePeriod
(Object period, PeriodType type, Chronology chrono) Creates a period by converting or copying from another object.MutablePeriod
(PeriodType type) Creates a zero-length period using the specified period type.MutablePeriod
(ReadableDuration duration, ReadableInstant endInstant, PeriodType type) Creates a period from the given duration and end point.MutablePeriod
(ReadableInstant startInstant, ReadableDuration duration, PeriodType type) Creates a period from the given start point and the duration.MutablePeriod
(ReadableInstant startInstant, ReadableInstant endInstant, PeriodType type) 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
(long startInstant, long endInstant, PeriodType type) Creates a period from the given interval endpoints.Period
(long startInstant, long endInstant, PeriodType type, Chronology chrono) Creates a period from the given interval endpoints.Period
(long duration, PeriodType type) Creates a period from the given millisecond duration.Period
(long duration, PeriodType type, Chronology chronology) Creates a period from the given millisecond duration.Period
(Object period, PeriodType type) Creates a period by converting or copying from another object.Period
(Object period, PeriodType type, Chronology chrono) Creates a period by converting or copying from another object.Period
(ReadableDuration duration, ReadableInstant endInstant, PeriodType type) Creates a period from the given duration and end point.Period
(ReadableInstant startInstant, ReadableDuration duration, PeriodType type) Creates a period from the given start point and the duration.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. -
Uses of PeriodType in org.joda.time.base
Methods in org.joda.time.base that return PeriodTypeModifier and TypeMethodDescriptionprotected PeriodType
BasePeriod.checkPeriodType
(PeriodType type) Validates a period type, converting nulls to a default value and checking the type is suitable for this instance.BasePeriod.getPeriodType()
Gets the period type.abstract PeriodType
BaseSingleFieldPeriod.getPeriodType()
Gets the period type which matches the duration field type.Methods in org.joda.time.base with parameters of type PeriodTypeModifier and TypeMethodDescriptionprotected PeriodType
BasePeriod.checkPeriodType
(PeriodType type) Validates a period type, converting nulls to a default value and checking the type is suitable for this instance.AbstractInterval.toPeriod
(PeriodType type) Converts the duration of the interval to aPeriod
using the specified period type.BaseDuration.toPeriod
(PeriodType type) Converts this duration to a Period instance using the specified period type and the ISO chronology.BaseDuration.toPeriod
(PeriodType type, Chronology chrono) Converts this duration to a Period instance using the specified period type and chronology.BaseDuration.toPeriodFrom
(ReadableInstant startInstant, PeriodType type) Converts this duration to a Period instance by adding the duration to a start instant to obtain an interval.BaseDuration.toPeriodTo
(ReadableInstant endInstant, PeriodType type) Converts this duration to a Period instance by subtracting the duration from an end instant to obtain an interval using the standard period type.Constructors in org.joda.time.base with parameters of type PeriodTypeModifierConstructorDescriptionprotected
BasePeriod
(int[] values, PeriodType type) Constructor used when we trust ourselves.protected
BasePeriod
(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis, PeriodType type) Creates a period from a set of field values.protected
BasePeriod
(long startInstant, long endInstant, PeriodType type, Chronology chrono) Creates a period from the given interval endpoints.protected
BasePeriod
(long duration, PeriodType type, Chronology chrono) Creates a period from the given millisecond duration, which is only really suitable for durations less than one day.protected
BasePeriod
(Object period, PeriodType type, Chronology chrono) Creates a new period based on another using theConverterManager
.protected
BasePeriod
(ReadableDuration duration, ReadableInstant endInstant, PeriodType type) Creates a period from the given duration and end point.protected
BasePeriod
(ReadableInstant startInstant, ReadableDuration duration, PeriodType type) Creates a period from the given start point and duration.protected
BasePeriod
(ReadableInstant startInstant, ReadableInstant endInstant, PeriodType type) Creates a period from the given interval endpoints.protected
BasePeriod
(ReadablePartial start, ReadablePartial end, PeriodType type) Creates a period from the given duration and end point. -
Uses of PeriodType in org.joda.time.convert
Methods in org.joda.time.convert that return PeriodTypeModifier and TypeMethodDescriptionAbstractConverter.getPeriodType
(Object object) Selects a suitable period type for the given object.PeriodConverter.getPeriodType
(Object object) Selects a suitable period type for the given object. -
Uses of PeriodType in org.joda.time.format
Methods in org.joda.time.format that return PeriodTypeModifier and TypeMethodDescriptionPeriodFormatter.getParseType()
Gets the PeriodType that will be used for parsing.Methods in org.joda.time.format with parameters of type PeriodTypeModifier and TypeMethodDescriptionPeriodFormatter.withParseType
(PeriodType type) Returns a new formatter with a different PeriodType for parsing.