| Interface | osid.calendaring.DateTime | ||
|---|---|---|---|
| Implements | osid.OsidPrimitive | ||
| Used By | osid.Metadata | ||
osid.OsidCompendium | |||
osid.OsidProfile | |||
osid.OsidRequest | |||
osid.Temporal | |||
osid.assessment.AssessmentOffered | |||
osid.assessment.AssessmentTaken | |||
osid.billing.Period | |||
osid.billing.payment.Payer | |||
osid.billing.payment.Payment | |||
| show 50 more⦠| |||
osid.billing.payment.Summary | |||
osid.blogging.Entry | |||
osid.calendaring.DateTimeInterval | |||
osid.calendaring.DateTimeList | |||
osid.calendaring.MeetingTime | |||
osid.calendaring.OffsetEvent | |||
osid.calendaring.Schedule | |||
osid.calendaring.SupersedingEvent | |||
osid.calendaring.TimePeriod | |||
osid.checklist.Todo | |||
osid.configuration.Value | |||
osid.course.Term | |||
osid.course.chronicle.AssessmentEntry | |||
osid.course.chronicle.AwardEntry | |||
osid.course.chronicle.CourseEntry | |||
osid.course.chronicle.CredentialEntry | |||
osid.course.chronicle.ProgramEntry | |||
osid.filing.DirectoryEntry | |||
osid.financials.FiscalPeriod | |||
osid.financials.posting.Post | |||
osid.forum.Post | |||
osid.forum.Reply | |||
osid.grading.GradeEntry | |||
osid.installation.Installation | |||
osid.installation.InstallationPackage | |||
osid.inventory.Inventory | |||
osid.inventory.shipment.Shipment | |||
osid.journaling.JournalEntry | |||
osid.locale.CalendarConversionSession | |||
osid.locale.CalendarFormattingSession | |||
osid.locale.CalendarInfo | |||
osid.logging.LogEntry | |||
osid.mapping.route.RouteProgress | |||
osid.messaging.Message | |||
osid.messaging.Receipt | |||
osid.ordering.Order | |||
osid.personnel.Person | |||
osid.provisioning.Provision | |||
osid.provisioning.ProvisionReturn | |||
osid.provisioning.Request | |||
osid.provisioning.RequestTransaction | |||
osid.recognition.Convocation | |||
osid.repository.Asset | |||
osid.resourcing.Work | |||
osid.rules.check.Check | |||
osid.search.terms.DateTimeRangeTerm | |||
osid.search.terms.DateTimeTerm | |||
osid.tracking.Issue | |||
osid.tracking.LogEntry | |||
osid.workflow.event.WorkflowEvent | |||
| Description |
The DateTime interface defines a date and/or time. This interface provides a very broad range of dates, describes more or less precision, and/or conveys an uncertainty. A number of convenience methods for retrieving time elements are available but only those methods covered by the specified granularity are valid. DateTime is a combination of a date and a time. The behavior of the date portion implies a subtely different behavior than the rest of the interface. What follows is an interpretation based on the Gregorian calendar most of use today.
The counting behavior and the semantic meaning of the elements is determined by the Calendar and Time Systems used although it is expected the fractional second behavior remains constant. A typical example is describing a day where the time isn't known, and the event did not occur at midnight. getMillennium() == 2
getCentury() == 18
getYear() == 1776
getMonth() == 7
getDay() == 4
getHour() == 0
getGranularity() == DateTimeResolution.DAY
definesUncertainty() == false
Another example showing that the time is probably 1pm but could have been as late as 3pm or early as noon. getMillennium() == 3
getCentury() == 21
getYear() == 2008
getMonth() == 3
getDay() == 17
getHour() == 13
getMinute() == 0
getGranularity() == TimeResolution.MINUTE
definesUncertainty() == true
getUncertaintyGranularity() == DateTimeResolution.HOUR
getUncertaintyMinus() == 1
getUncertaintyPlus == 2
An example marking the birth of the universe. 13.73 billion years +/- 120 million years. The granularity suggests that no more resolution than one million years can be inferred from the "clock", making errors in the exact number of millennia insignificant. getEpoch() == -13,730
getGranularity() == TimeResolution.EPOCH
definesUncertainty() == true
getUncertaintyGranularity() == DateTimeResolution.EPOCH
getUncertaintyMinus() == 120
getUncertaintyPlus == 120
The way to think about granularity versus uncertainty is that granularity is the space between the clock ticks. A clock which displays minutes cannot tell you the second something occurred. Uncertainty is based on the measurement. My digital camera reports times in 100ms increments. That's as granular as it gets. It does not run a NTP client, so it can be a few minutes off. That's its uncertainty. Finally, uncertainty may be inclusive. Plus or minus 1 year implies the entire two year range of time inclusive of every fractional second in between. A non-inclusive uncertainty implies only three DateTimes -- now, this time 1 year ago, and this time 1 year from now. "This is a photo of the family at Christmas dinner. It could have been 1982 or 1983." | ||
| Method | getCalendarType | ||
| Description |
Gets the calendar type. | ||
| Return | osid.type.Type | the calendar type | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getAeon | ||
| Description |
Gets the aeon. An aeon is 1B years. | ||
| Return | integer | the aeon | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getEpoch | ||
| Description |
Gets the epoch. An epoch is 1M years. | ||
| Return | integer | the eposh | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getMillennium | ||
| Description |
Gets the millennium. A millenium is 1,000 years. | ||
| Return | integer | the millennium | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getCentury | ||
| Description |
Gets the century. | ||
| Return | integer | the century | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getYear | ||
| Description |
Gets the year. | ||
| Return | integer | the year | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getMonth | ||
| Description |
Gets the month number. | ||
| Return | cardinal | the month | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getWeek | ||
| Description |
Gets the week. | ||
| Return | cardinal | the week | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getDay | ||
| Description |
Gets the day. | ||
| Return | cardinal | the day of the month | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getTimeType | ||
| Description |
Gets the time type. | ||
| Return | osid.type.Type | the time type | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getHour | ||
| Description |
Gets the hour of the day. | ||
| Return | cardinal | the hour of the day | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getMinute | ||
| Description |
Gets the minute of the hour. | ||
| Return | cardinal | the minute of the hour | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getSecond | ||
| Description |
Gets the second of the minute. | ||
| Return | cardinal | the second of the minute | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getMilliseconds | ||
| Description |
Gets the number of milliseconds in this second 0-999. A millisecond is one thousandth (1e-3) of a second. | ||
| Return | cardinal | the milliseconds of the second | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getMicroseconds | ||
| Description |
Gets the number of microseconds of the second 0-999. A microsecond is one millionth (1e-6) of a second. | ||
| Return | cardinal | the micrseconds of the millisecond | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getNanoseconds | ||
| Description |
Gets the number of nanoseconds of the microsecond 0-999. A nanosecond is one billionth (1e-9) of a second. | ||
| Return | cardinal | the nanoseconds of the microsecond | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getPicoseconds | ||
| Description |
Gets the number of picoseconds of the nanosecond 0-999. A picosecond is one trillionth (1e-12) of a second. | ||
| Return | cardinal | the picoseconds of the nanosecond | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getFemtoseconds | ||
| Description |
Gets the number of femtoseconds of the picosecond 0-999. A femtosecond is one quadrillionth (1e-15) of a second. | ||
| Return | cardinal | the femtoseconds of the picosecond | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getAttoseconds | ||
| Description |
Gets the number of attoseconds of the femtoseconds 0-999. An attosecond is one quintillionth (1e-18) of a second. | ||
| Return | cardinal | the attoseconds of the femtosecond | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getZeptoseconds | ||
| Description |
Gets the number of zeptoseconds of the attosecond 0-999. A zeptosecond is one sextillionth (1e-21) of a second. | ||
| Return | cardinal | the zeptoseconds of the attosecond | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getYoctoseconds | ||
| Description |
Gets the number of yoctoseconds of the picosecond 0-999. A yoctosecond is one septillionth (1e-24) of a second. This is getting quite small. | ||
| Return | cardinal | the yoctoseconds of the picosecond | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getRontoseconds | ||
| Description |
Gets the number of rontoseconds of the yoctosecond 0-999. A rontosecond is one octillionth (1e-27) of a second. | ||
| Return | cardinal | the rontoseconds of the yoctosecond | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getQuectoseconds | ||
| Description |
Gets the number of quectoseconds of the rontosecond 0-999. A quectosecond is one nonillionth (1e-30) of a second. | ||
| Return | cardinal | the quectoseconds of the rontoseconds | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getMilliquectoseconds | ||
| Description |
Gets the number of milliquectoseconds of the quectosecond 0-999. A milliquectosecond is one decillionth (1e-33) of a second. | ||
| Return | cardinal | the milliquectoseconds of the quectosecond | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getMicroquectoseconds | ||
| Description |
Gets the number of microquectoseconds of the milliquectosecond 0-999. A microquectosecond is one undecillionth (1e-36) of a second. | ||
| Return | cardinal | the microquectoseconds of the milliquectosecond | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getPlanckseconds | ||
| Description |
Gets the number of planckseconds of the microquectosecond. A plancksecond is 53.91247 quattuordecillionths (5.391247e-44) of a second. | ||
| Return | cardinal | the plancks of the microquectosecond | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getGranularity | ||
| Description |
Gets the granularity of this time. The granularity indicates the resolution of the clock (the tick). More precision than what is specified in this method cannot be inferred from the available data. | ||
| Return | osid.calendaring.DateTimeResolution | granularity | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getGranularityMultiplier | ||
| Description |
If the granularity of the time equals
| ||
| Return | cardinal | granularity multiplier | |
| Compliance | mandatory | This method must be implemented. | |
| Method | definesUncertainty | ||
| Description |
Tests if uncertainty is defined for this time. | ||
| Return | boolean | true if uncertainty is defined, false otherwise | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getUncertaintyUnits | ||
| Description |
Gets the units of the uncertainty. | ||
| Return | osid.calendaring.DateTimeResolution | units of the uncertainty | |
| Errors | ILLEGAL_STATE | definesUncertainty() is false | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getUncertaintyMinus | ||
| Description |
Gets the uncertainty of this datetime in the negative direction. | ||
| Return | cardinal | the uncertainty under this value | |
| Errors | ILLEGAL_STATE | definesUncertainty() is false | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getUncertaintyPlus | ||
| Description |
Gets the uncertainty of this datetime in the positive direction. | ||
| Return | cardinal | the uncertainty over this value | |
| Errors | ILLEGAL_STATE | definesUncertainty() is false | |
| Compliance | mandatory | This method must be implemented. | |
| Method | isUncertaintyDateInclusive | ||
| Description |
Tests if the uncertainty is inclusive of all dates. An inclusive uncertainty includes the entire range specified by the uncertainty units e.g. +/- 1 year includes all of the months and days within that interval. A non-inclusive uncertainty would mean the year is uncertain but the month and day is certain. | ||
| Return | boolean | true if the uncertainty includes all dates,
false otherwise | |
| Errors | ILLEGAL_STATE | definesUncertainty() is false | |
| Compliance | mandatory | This method must be implemented. | |