OSID Logo
OSID Specifications
calendaring package
Version 3.0.0
Release Candidate Preview
Interfaceosid.calendaring.Duration
Implementsosid.OsidPrimitive
Description

The Duration a length of time.

While a DateTime represents a point on a calendar and a tick on a clock, a Duration represents a measurement. Each of these methods returns the total absolute measurement in the specified units.

MethodgetCalendarType
Description

Gets the calendar type.

Returnosid.type.Typethe calendar type
CompliancemandatoryThis method must be implemented.
MethodgetTimeType
Description

Gets the time type.

Returnosid.type.Typethe time type
CompliancemandatoryThis method must be implemented.
MethodgetAeons
Description

Gets the number of aeons. An aeon is 1B years.

Returndecimalthe number of aeons
CompliancemandatoryThis method must be implemented.
MethodgetEpochs
Description

Gets the number of epochs. An epoch is 1M years.

Returndecimalthe number of epochs
CompliancemandatoryThis method must be implemented.
MethodgetMillennia
Description

Gets the number of millennia. A millennium is 1,000 years.

Returndecimalthe number of millennia
CompliancemandatoryThis method must be implemented.
MethodgetCenturies
Description

Gets the number of centuries.

Returndecimalthe number of centuries
CompliancemandatoryThis method must be implemented.
MethodgetScores
Description

Gets the number of scores.

Returndecimalthe number of scores
CompliancemandatoryThis method must be implemented.
MethodgetBluemoons
Description

Gets the number of blue moons.

Returndecimalthe number of blue moons
CompliancemandatoryThis method must be implemented.
MethodgetYears
Description

Gets the number of years.

Returndecimalthe number of years
CompliancemandatoryThis method must be implemented.
MethodgetMonths
Description

Gets the number of months.

Returndecimalthe number of months
CompliancemandatoryThis method must be implemented.
MethodgetWeeks
Description

Gets the number of weeks.

Returndecimalthe number of weeks
CompliancemandatoryThis method must be implemented.
MethodgetDays
Description

Gets the number of days.

Returndecimalthe number of days
CompliancemandatoryThis method must be implemented.
MethodgetHours
Description

Gets the number of hours.

Returndecimalthe number of hours
CompliancemandatoryThis method must be implemented.
MethodgetMinutes
Description

Gets the number of minutes.

Returndecimalthe number of minutes
CompliancemandatoryThis method must be implemented.
MethodgetSeconds
Description

Gets the number of seconds.

Returndecimalthe number of seconds
CompliancemandatoryThis method must be implemented.
MethodgetMilliseconds
Description

Gets the number of milliseconds. A millisecond is one thousandth of a second.

Returndecimalthe number of milliseconds
CompliancemandatoryThis method must be implemented.
MethodgetMicroseconds
Description

Gets the number of microseconds. A microsecond is one millionth of a second.

Returndecimalthe number of micrseconds
CompliancemandatoryThis method must be implemented.
MethodgetNanoseconds
Description

Gets the number of nanoseconds. A nanosecond is one billionth of a second.

Returndecimalthe number of nanoseconds
CompliancemandatoryThis method must be implemented.
MethodgetPicoseconds
Description

Gets the number of picoseconds. A picosecond is one trillionth of a second.

Returndecimalthe number of picoseconds
CompliancemandatoryThis method must be implemented.
MethodgetFemtoseconds
Description

Gets the number of femtoseconds. A femtosecond is one quadrillionth of a second.

Returndecimalthe number of femtoseconds
CompliancemandatoryThis method must be implemented.
MethodgetAttoseconds
Description

Gets the number of attoseconds. An attosecond is one quintillionth of a second.

Returndecimalthe number of attoseconds
CompliancemandatoryThis method must be implemented.
MethodgetZeptoseconds
Description

Gets the number of zeptoseconds. A zeptosecond is one sextillionth of a second.

Returndecimalthe number of zeptoseconds
CompliancemandatoryThis method must be implemented.
MethodgetYoctoseconds
Description

Gets the number of yoctoseconds. A yoctosecond is one septillionth of a second. This is getting quite small.

Returndecimalthe number of yoctoseconds
CompliancemandatoryThis method must be implemented.
MethodgetXoxxoseconds
Description

Gets the number of xoxxoseconds. A xoxxosecond is one octillionth of a second. We're going with Rudy Rucker here.

Returndecimalthe number of xoxxoseconds
CompliancemandatoryThis method must be implemented.
MethodgetWeebleseconds
Description

Gets the number of weebleseconds. A weeblesecond is one nonillionth of a second.

Returndecimalthe number of weebleseconds
CompliancemandatoryThis method must be implemented.
MethodgetVatoseconds
Description

Gets the number of vatoseconds. A vatosecond is one decillionth of a second.

Returndecimalthe number of vatoseconds
CompliancemandatoryThis method must be implemented.
MethodgetUndaseconds
Description

Gets the number of undaseconds. An undasecond is one unadecillionth of a second.

Returndecimalthe number of undaseconds
CompliancemandatoryThis method must be implemented.
MethodgetPlanckSeconds
Description

Gets the number of Planck sseconds. A Planck is 10 quattuordecillionths of a second.

Returndecimalthe number of planck seconds
CompliancemandatoryThis method must be implemented.
MethodgetGranularity
Description

Gets the granularity of this duration. The granularity indicates the resolution of the clock. More precision than what is specified in this method cannot be inferred from the available data.

Returnosid.calendaring.DateTimeResolutionthe time units
CompliancemandatoryThis method must be implemented.
MethodgetGranularityMultiplier
Description

If the granularity of the time equals getGranularity(), then the multiplier is 1. This method may return a different number when the granularity differs from one of the defined resolutions.

Returncardinalgranularity multiplier
CompliancemandatoryThis method must be implemented.
MethoddefinesUncertainty
Description

Tests if uncertainty is defined for this time.

Returnboolean true if uncertainty is defined, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetUncertaintyUnits
Description

Gets the units of the uncertainty.

Returnosid.calendaring.DateTimeResolutionunits of the uncertainty
ErrorsILLEGAL_STATE definesUncertainty() is false
CompliancemandatoryThis method must be implemented.
MethodgetUncertaintyMinus
Description

Gets the uncertainty of this time in the negative direction.

Returncardinalthe uncertainty under this value
ErrorsILLEGAL_STATE definesUncertainty() is false
CompliancemandatoryThis method must be implemented.
MethodgetUncertaintyPlus
Description

Gets the uncertainty of this time in the positive direction.

Returncardinalthe uncertainty over this value
ErrorsILLEGAL_STATE definesUncertainty() is false
CompliancemandatoryThis method must be implemented.