ontology http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/dt.wsml
namespace
default=http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/dt.wsml#,
dc=http://purl.org/dc/elements/1.1#,
wsml=http://www.wsmo.org/2004/d16/d16.1/v0.2/20040418#
non-functional-properties
dc:title "Date and Time Ontology ontology"
dc:creator "DERI International"
dc:subject "Date", "Time", "Date and Time Algebra"
dc:description "generic representation of data and time including basic algebra"
dc:publisher "DERI International"
dc:contributor "Holger Lausen", "Axel Polleres", "Ruben Lara"
dc:date "2004-07-06"
dc:type http://www.wsmo.org/2004/d2/v0.3/20040329/#ontos
dc:format "text/plain"
dc:language "en-US"
dc:relation http://www.isi.edu/~pan/damltime/time-entry.owl,
http://www.w3.org/TR/xmlschema-2/
dc:coverage "World"
dc:rights http://www.deri.org/privacy.html
version "$Revision: 1.8 $"
comment: conceptDefinitions
concept instant
non-functional-properties
dc:description "An instant represents a particular point in time"
concept interval
non-functional-properties
dc:description "An interval represents a duration between 2 points in time"
start oftype instant
end oftype instant
concept date
non-functional-properties
dc:description "concept date and its representation according to the Gregorian Calendar"
subconceptOf instant
dayOfMonth oftype dayOfMonth
monthOfYear oftype monthOfYear
year oftype year
concept dayOfMonth
non-functional-properties
dc:description "day of a month is represented by an integer"
subconceptOf integer
concept year
non-functional-properties
dc:description "year is represented by an integer"
subconceptOf integer
concept monthOfYear
non-functional-properties
dc:description "monthOfYear is represented by an integer"
subconceptOf integer
concept time
hourOfDay oftype hourOfDay
minuteOfHour oftype minuteOfHour
secondOfMinute oftype secondOfMinute
concept secondOfMinute
non-functional-properties
dc:description "a secondOfMinute is represented by an integer"
subconceptOf integer
concept minuteOfHour
non-functional-properties
dc:description "a minuteOfHour is represented by an integer"
subconceptOf integer
concept hourOfDay
non-functional-properties
dc:description "a hourOfDay is represented by an integer"
subconceptOf integer
concept dateAndTime
non-functional-properties
dc:description "concept date and time and representing together a specific point of time (instant)"
subconceptOf instant
date oftype date
time oftype time
comment: variableDefintions
variable X, Y, Z, D1, D2 oftype topConcept
variable A, B, C, D, E, F, JDN, JDN_D1, JDN_D2, SFM_T1, SFM_T2 oftype xsd:integer
variable T, T1, T2 oftype time
variable JulianDayNumber, Difference, SecondsFromMidnight oftype xsd:integer
variable Instant, Instant1, Instant2 oftype instant
comment: relationDefinitions
relation invalid
non-functional-properties
dc:description "the invalid relation is one way to encode an integrity constraints,
if the extension of this relation is non empty the ontology is inconsistent, i.e.
the extension contains all invalid resources.
Axioms can be used to define the extension e.g. validMonthOfYear"
parameter anyObject oftype topConcept
comment: functionDefintions
function julianDayNumber
non-functional-properties
dc:description "The Julian Day Count is a uniform count of days from a remote epoch
in the past (about 4712 BC). At this instant, the Julian Day Number is 0. Once
you have the Julian Day Number of a particular date in history, it is easy to
calculate time elapsed between it and any other Julian Day Number"
dc:source http://quasar.as.utexas.edu/BillInfo/JulianDatesG.html
parameter Instant oftype instant
non-functional-properties
dc:descripion "For each instant there should exist a corresponding Julian Day
Number, however it may not be always defined only by this binary predicate,
e.g. if the instant is represented as Gregorian Date and it is a date between
1582 and 1924 a country must be given as third parameter (since e.g. Greece
changed no earlier then 9th of March 1924 from the Julian to the Gregorian Calendar)"
comment: The following dc:source indicates which country changed in which year
comment: from the Julian to the Gregorian Calendar
dc:source http://members.brabant.chello.nl/~h.reints/cal/whenjul2greg.htm
range JulianDayNumber oftype xsd:integer
function daysBetween
non-functional-properties
dc:description "(Instant1, Instant2, Difference) is a triple of the ternary relation
corresponding to this function iff Instant1 and Instant2 are members of the concept
'instant' (particular point in time) and Instant2 is 'Difference' days after Instant1."
parameter instant1 oftype instant
parameter instant2 oftype instant
range oftype integer
function secondsBetween
non-functional-properties
dc:description "(Instant1, Instant2, Difference) is a triple of the ternary relation
corresponding to this function iff Instant1 and Instant2 are members of the concept
'instant' (particular point in time) and Instant2 is 'Differnce' seconds after Instant1."
parameter instant1 oftype instant
parameter instant2 oftype instant
range oftype integer
function secondsFromMidnight
non-functional-properties
dc:description "(Time, SecondsFromMidnight) is a tuple of the binary relation
corresponding to this function iff SecondsFromMidnight are the seconds elapsed from
00:00:00 of the same day.
This simplifies the axiomatization of the difference between two given times"
parameter time oftype time
range oftype integer
function contains
non-functional-properties
dc:description "(Interval, X) is a tuple of the binary relation
corresponding to this function iff Interval contains X and X is an instant or an
interval"
parameter interval1 oftype interval
range oftype (instant or interval)
comment: axiomDefintions
axiom validMonthOfYear
non-functional-properties
dc:description "integrity constraint for valid monthOfYear"
logical-expression
"invalid (X) <-
X memberOf monthOfYear and
(X < 1 or X > 12)."
axiom validDayOfMonth
non-functional-properties
dc:description "integrity constraint for valid dayOfMonths"
logical-expression
"invalid (X) <-
X memberOf dayOfMonth and
(X < 1 or X > 31)."
axiom validDate
non-functional-properties
dc:description "Integrity Constraints for date.
The dayOfMonth is valid in dependency of the actual monthOfYear, in a leap
year the month 2 of the Year has 29 days otherwise 28. For leap years holds
the following: Every year divisible by 4 is a leap year. However, every
year divisible by 100 is not a leap year. However, every year divisible by
400 is a leap year after all.
Note: This axiomatization is still imprecise, since the country plays a role
when defining a valid day of the month: E.g. 1712 was a double leap year
in Sweden, i.e. February 1712 had 30 days in Sweden.
The mathematical function symbol modulo is assumed to be defined elsewhere
as that it returns the remainder after an integer division of its
first argument by its second"
dc:source http://www.tondering.dk/claus/cal/node3.html
logical-expression
"invalid (X) <-
X memberOf date and
(invalid(X.monthOfYear) or invalid(X.year)
or (X.dayOfMonth > 31 and X.monthOfYear = 1)
or (X.dayOfMonth > 28 and X.monthOfYear = 2
and not (modulo(X.year,4) = 0 and (modulo(X.year,100) != 0 or modulo(X.year,400) = 0)))
or (X.dayOfMonth > 29 and X.monthOfYear = 2)
or (X.dayOfMonth > 31 and X.monthOfYear = 3)
or (X.dayOfMonth > 30 and X.monthOfYear = 4)
or (X.dayOfMonth > 31 and X.monthOfYear = 5)
or (X.dayOfMonth > 30 and X.monthOfYear = 6)
or (X.dayOfMonth > 31 and X.monthOfYear = 7)
or (X.dayOfMonth > 31 and X.monthOfYear = 8)
or (X.dayOfMonth > 30 and X.monthOfYear = 9)
or (X.dayOfMonth > 31 and X.monthOfYear = 10)
or (X.dayOfMonth > 30 and X.monthOfYear = 11)
or (X.dayOfMonth > 31 and X.monthOfYear = 12)
)."
axiom validHourOfDay
non-functional-properties
dc:description "integrity constraint for valid hourOfDay:"
logical-expression
"invalid (X) <-
X memberOf hourOfDay and
(X < 0 or X > 23)."
axiom validMinuteOfHour
non-functional-properties
dc:description "integrity constraint for valid minuteOfHour:"
logical-expression
"invalid (X) <-
X memberOf minuteOfHour and
(X < 0 or X > 59)."
axiom validSecondOfMinute
non-functional-properties
dc:description "integrity constraint for valid secondOfMinute:"
logical-expression
"invalid (X) <-
X memberOf secondOfMinute and
(X < 0 or X > 59)."
axiom validTime
non-functional-properties
dc:description "integrity constraint for valid time:"
logical-expression
"invalid (X) <-
X memberOf time and
(invalid(X.hourOfDay) or invalid(X.minuteOfHour) or invalid(X.secondOfMinute))."
axiom validDateAndTime
non-functional-properties
dc:description "integrity constraint for valid dateAndTimes:"
logical-expression
"invalid (X) <-
X memberOf dateAndTime and
(invalid(X.date) or invalid(X.time))."
axiom validInterval
non-functional-properties
dc:description "computes if a interval X contains a second interval Y"
logical-expression
"invalid(X) <-
X memberOf interval and X.start < X.end."
axiom equalityDate
non-functional-properties
dc:description "computes equality of a date"
logical-expression
"X = Y <-
Y memberOf date and X memberOf date and
X.dayOfMonth = Y.dayOfMonth and
X.monthOfYear = Y.monthOfYear and
X.year = Y.year."
axiom beforeDate
non-functional-properties
dc:description "computes if a given date X is before another date Y"
logical-expression
"X < Y <-
Y memberOf date and X memberOf date and
((X.dayOfMonth = Y.dayOfMonth and X.monthOfYear = Y.monthOfYear and X.year = Y.year) or
(X.monthOfYear < Y.monthOfYear and X.year = Y.year) or
(X.year < Y.year))."
axiom afterDate
non-functional-properties
dc:description "defined as inverse of beforeDate"
logical-expression
"X > Y <- Y < X"
axiom julianDayNumber
non-functional-properties
dc:description "This Axiom describes how the correct Julian Day Number
can be computed for a given Gregorian Calendar Date. Note
that the Gregorian Calendar was introduced in 15.October 1582.
however until 1919 this axiomatization is not unambiguous since the country
should be taken into to account as 3rd parameter (e.g. Greece
changed at the 9 Mar 1924 from the Julian to the Gregorian calendar).
Details to the axiomatization
If the month is January or February we subtract 1 from the year to get a new Year
and add 12 to the month to get a new Month. (Thus, we are thinking of January and
February as being the 13th and 14th month of the previous year and March is the
start of the year, this simplifies the calculation considering the leap year)
Within the calculation the fractional part of all results has to be dropped,
here we use the function symbol floor() [it can be rewritten as predicate,
however it gets less readable]
A more lengthy description of this axiomatization can be found at
http://quasar.as.utexas.edu/BillInfo/JulianDatesG.html"
dc:source http://quasar.as.utexas.edu/BillInfo/JulianDatesG.html,
http://members.brabant.chello.nl/~h.reints/cal/whenjul2greg.htm
logical-expression
"julianDayNumber(X) = JDN <-
X memberOf date and
((
X.monthOfYear < 3 and
Y = X.year -1 and
M = X.monthOfYear + 12
)
or
(
X.monthOfYear > 2 and
Y = X.year and
M = X.monthOfYear
))
and
D = X.dayOfMonth and
A = floor(Y / 100) and
B = floor(A / 4) and
C = 2 - A + B and
E = floor(365.25 * (Y + 4716)) and
F = floor(30.6001 * (M + 1)) and
JDN = C + D + E + F - 1524."
axiom daysBetweenDates
non-functional-properties
dc:description "the difference in days between 2 dates"
logical-expression
"daysBetween(D1, D2) = X <-
D1 memberOf date and D2 memberOf date and
julianDayNumber(D1, JDN_D1) and
julianDayNumber(D2, JDN_D2) and
X = JDN_D1 - JDN_D2."
axiom equalityTime
non-functional-properties
dc:description "computes if two given times are the same"
logical-expression
"X = Y <-
X memberOf time and Y memberOf time and
X.secondOfMinute = Y.secondOfMinute and
X.minuteOfHour = Y.minuteOfHour and
X.hourOfDay = Y.hourOfDay."
axiom beforeTime
non-functional-properties
dc:description "computes if a given time X is before another time Y"
logical-expression
"X < Y <-
X memberOf time and Y memberOf time and
((X.secondOfMinute < Y.secondOfMinute and X.minuteOfHour = Y.minuteOfHour and X.hourOfDay = Y.hourOfDay) or
(X.minuteOfHour < Y.minuteOfHour and X.hourOfDay = Y.hourOfDay) or
(X.hourOfDay < Y.hourOfDay))."
axiom afterTime
non-functional-properties
dc:description "defined as inverse of beforeTime"
logical-expression
"X > Y <- Y < X."
axiom secondsFromMidnight
non-functional-properties
dc:description "computes the amount of seconds from midnight"
logical-expression
"secondsFromMidnight(T, X) <-
T memberOf time and
X = T.secondOfMinute + (T.minuteOfHour*60) + (T.hourOfDay*60*60)."
axiom secondsBetweenTimes
non-functional-properties
dc:description "the difference in seconds between 2 times"
logical-expression
"secondsBetween(T1, T2, X) <-
T1 memberOf time and T2 memberOf time and
secondsFromMidnight(T1, SFM_T1) and
secondsFromMidnight(T2, SFM_T2) and
X = SFM_T1 - SFM_T2."
axiom equalityDateAndTime
non-functional-properties
dc:description "computes if Date and Time are equal"
logical-expression
"X = Y <-
X memberOf dateAndTime and Y memberOf dateAndTime and
X.date = Y.date and
X.time = Y.time."
axiom beforeDateAndTime
non-functional-properties
dc:description "computes if a given date and time X is before another date and time Y"
logical-expression
"X < Y <-
X memberOf dateAndTime and Y memberOf dateAndTime and
((X.date = Y.date and X.time < Y.time) or
X.date < Y.date)."
axiom afterDateAndTime
non-functional-properties
dc:description "defined as inverse of beforeDateAndTime"
logical-expression
"X > Y <- Y < X."
axiom secondsBetweenDateAndTime
non-functional-properties
dc:description "computes the difference in seconds between two different DateAndTime"
logical-expression
"secondsBetween(D1, D2, X) <-
D1 memberOf dateAndTime and D2 memberOf dateAndTime and
julianDayNumber(D1.date, JDN_D1) and
julianDayNumber(D2.date, JDN_D2) and
secondsFromMidnight(D1.time, SFM_T1) and
secondsFromMidnight(D2.time, SFM_T2) and
X = SFM_T1 + JDN_D1 * 24 * 60 * 60 -
(SFM_T2 + JDN_D2 * 24 * 60 * 60)."
axiom daysBetweenDateAndTime
non-functional-properties
dc:description "the difference in days between two different DateAndTime"
logical-expression
"daysBetween(D1, D2, X) <-
D1 memberOf dateAndTime and D2 memberOf dateAndTime and
daysBetween(D1.date, D2.date, X)."
axiom intervalContainment
non-functional-properties
dc:description "computes if a interval X contains a second interval Y"
logical-expression
"contains(X, Y) <-
X memberOf interval and Y memberOf interval and
(X.start < Y.start or X.start = Y.start) and
(X.end > Y.end or X.end = Y.end)."
axiom instantContainment
non-functional-properties
dc:description "computes if a interval X contains a instant Y"
logical-expression
"contains(X, Y) <-
X memberOf interval and Y memberOf instant and
(X.start < Y or X.start = Y) and
(X.end > Y or X.end = Y)."