namespace dc: <> targetNameSpace: <> ontology <> nonFunctionalProperties dc:title hasValue "Date and Time Ontology" dc:creator hasValue "DERI International" dc:subject hasValues {"Date", "Time", "Date and Time Algebra"} dc:description hasValue "generic representation of data and time including basic algebra" dc:publisher hasValue "DERI International" dc:date hasValue "2004-10-04" dc:type hasValue <> dc:format hasValue "text/plain" dc:language hasValue "en-US" dc:relation hasValues {<>, <>} dc:coverage hasValue "World" dc:rights hasValue <> version hasValue "$Revision: 1.23 $" endNonFunctionalProperties comment: conceptDefinitions concept instant nonFunctionalProperties dc:description hasValue "An instant represents a particular point in time and is the super concept of all concrete representations such as the Gregorian calendar" endNonFunctionalProperties concept interval nonFunctionalProperties dc:description hasValue "An interval represents a duration between 2 points in time" endNonFunctionalProperties start ofType instant end ofType instant concept date subConceptOf instant nonFunctionalProperties dc:description hasValue "concept date and its representation according to the Gregorian Calendar" endNonFunctionalProperties dayOfMonth ofType dayOfMonth monthOfYear ofType monthOfYear year ofType year concept dayOfMonth subConceptOf xsd:integer nonFunctionalProperties dc:description hasValue "day of a month is represented by an integer" endNonFunctionalProperties concept year subConceptOf xsd:integer nonFunctionalProperties dc:description hasValue "year is represented by an integer" endNonFunctionalProperties concept monthOfYear subConceptOf xsd:integer nonFunctionalProperties dc:description hasValue "monthOfYear is represented by an integer" endNonFunctionalProperties concept time hourOfDay ofType hourOfDay minuteOfHour ofType minuteOfHour secondOfMinute ofType secondOfMinute concept secondOfMinute subConceptOf xsd:integer nonFunctionalProperties dc:description hasValue "a secondOfMinute is represented by an integer" endNonFunctionalProperties concept minuteOfHour subConceptOf xsd:integer nonFunctionalProperties dc:description hasValue "a minuteOfHour is represented by an integer" endNonFunctionalProperties concept hourOfDay subConceptOf xsd:integer nonFunctionalProperties dc:description hasValue "a hourOfDay is represented by an integer" endNonFunctionalProperties concept dateAndTime subConceptOf instant nonFunctionalProperties dc:description hasValue "concept date and time and representing together a specific point of time (instant)" endNonFunctionalProperties date ofType date time ofType time comment: functionDefintions function julianDayNumber nonFunctionalProperties dc:description hasValue "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 hasValue <> dc:description hasValue "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 hasValue <> endNonFunctionalProperties instant ofType instant range ofType xsd:integer function daysBetween nonFunctionalProperties dc:description hasValue "(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." endNonFunctionalProperties instant1 ofType instant instant2 ofType instant range ofType xsd:integer function secondsBetween nonFunctionalProperties dc:description hasValue "(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." endNonFunctionalProperties instant1 ofType instant instant2 ofType instant range ofType xsd:integer function secondsFromMidnight nonFunctionalProperties dc:description hasValue "(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" endNonFunctionalProperties time ofType time range ofType xsd:integer comment: relationDefintions relation contains nonFunctionalProperties dc:description hasValue "(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" endNonFunctionalProperties interval ofType interval intervalOrInstant ofType instantOrInterVal concept instantOrInterVal definedBy forAll ?x (?x memberOf instantOrInterVal <-> ?x memberOf instant or ?x memberOf interval). comment: axiomDefinitions axiom invalidMonthOfYear nonFunctionalProperties dc:description hasValue "integrity constraint for valid monthOfYear" endNonFunctionalProperties definedBy constraint ?X memberOf monthOfYear and (?X < 1 or X > 12). axiom invalidDayOfMonth nonFunctionalProperties dc:description hasValue "integrity constraint for valid dayOfMonths" endNonFunctionalProperties definedBy constraint ?X memberOf dayOfMonth and (X < 1 or X > 31). axiom validDate nonFunctionalProperties dc:description hasValue "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 hasValue <> endNonFunctionalProperties definedBy constraint ?X memberOf date and ( (?X.dayOfMonth > 28 and ?X.monthOfYear = 2 and not ((modulo(?X.year ,4) = 0 and not modulo(?X.year ,100) = 0) or modulo(?X.year ,400) = 0)) or (?X.dayOfMonth > 29 and ?X.monthOfYear = 2) or (?X.dayOfMonth > 30 and ?X.monthOfYear = 4) or (?X.dayOfMonth > 30 and ?X.monthOfYear = 6) or (?X.dayOfMonth > 30 and ?X.monthOfYear = 9) or (?X.dayOfMonth > 30 and ?X.monthOfYear = 11)). axiom invalidHourOfDay nonFunctionalProperties dc:description hasValue "integrity constraint for valid hourOfDay:" endNonFunctionalProperties definedBy constraint ?X memberOf hourOfDay and (?X < 0 or ?X >= 24). axiom invalidMinuteOfHour nonFunctionalProperties dc:description hasValue "integrity constraint for valid minuteOfHour:" endNonFunctionalProperties definedBy constraint ?X memberOf minuteOfHour and (?X < 0 or ?X >= 60). axiom invalidSecondOfMinute nonFunctionalProperties dc:description hasValue "integrity constraint for valid secondOfMinute:" endNonFunctionalProperties definedBy constraint ?X memberOf secondOfMinute and (?X < 0 or ?X >= 60). axiom invalidInterval definedBy constraint ?X memberOf interval and ?X.start >= ?X.end. axiom equalityDate nonFunctionalProperties dc:description hasValue "computes equality of a date" endNonFunctionalProperties definedBy 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 nonFunctionalProperties dc:description hasValue "computes if a given date X is before another date ?Y" endNonFunctionalProperties definedBy ?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 nonFunctionalProperties dc:description hasValue "defined as inverse of beforeDate" endNonFunctionalProperties definedBy ?X > ?Y <- ?Y < ?X. axiom julianDayNumber nonFunctionalProperties dc:description hasValue "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 hasValues {<>, <>} endNonFunctionalProperties definedBy julianDayNumber[instant hasValue ?X, result hasValue ?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 nonFunctionalProperties dc:description hasValue "the difference in days between 2 dates" endNonFunctionalProperties definedBy daysBetween[instant1 hasValue ?D1, instant2 hasValue ?D2, result hasValue ?X] <- ?D1 memberOf date and ?D2 memberOf date and ?X = julianDayNumber(?D1) - julianDayNumber(?D2). axiom equalityTime nonFunctionalProperties dc:description hasValue "computes if two given times are the same" endNonFunctionalProperties definedBy ?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 nonFunctionalProperties dc:description hasValue "computes if a given time ?X is before another time ?Y" endNonFunctionalProperties definedBy ?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 nonFunctionalProperties dc:description hasValue "defined as inverse of beforeTime" endNonFunctionalProperties definedBy ?X > ?Y <- ?Y < ?X. axiom secondsFromMidnight nonFunctionalProperties dc:description hasValue "computes the amount of seconds from midnight" endNonFunctionalProperties definedBy secondsFromMidnight[time hasValue ?T, result hasValue ?X] <- ?T memberOf time and ?X = ?T.secondOfMinute + (?T.minuteOfHour*60) + (?T.hourOfDay*60*60). axiom secondsBetweenTimes nonFunctionalProperties dc:description hasValue "the difference in seconds between 2 times" endNonFunctionalProperties definedBy secondsBetween[instant1 hasValue ?T1, instant2 hasValue T2, result hasValue ?X] <- ?T1 memberOf time and ?T2 memberOf time and ?X = secondsFromMidnight(?T1) - secondsFromMidnight(?T2). axiom equalityDateAndTime nonFunctionalProperties dc:description hasValue "computes if Date and Time are equal" endNonFunctionalProperties definedBy ?X = ?Y <- ?X memberOf dateAndTime and ?Y memberOf dateAndTime and ?X.date = ?Y.date and ?X.time = ?Y.time. axiom beforeDateAndTime nonFunctionalProperties dc:description hasValue "computes if a given date and time ?X is before another date and time ?Y" endNonFunctionalProperties definedBy ?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 nonFunctionalProperties dc:description hasValue "defined as inverse of beforeDateAndTime" endNonFunctionalProperties definedBy ?X > ?Y <- ?X memberOf dateAndTime and ?Y memberOf dateAndTime and ?Y < ?X. axiom secondsBetweenDateAndTime nonFunctionalProperties dc:description hasValue "computes the difference in seconds between two different DateAndTime" endNonFunctionalProperties definedBy secondsBetween[instant1 hasValue ?D1, instant2 hasValue ?D2, result hasValue ?X] <- ?D1 memberOf dateAndTime and ?D2 memberOf dateAndTime and ?X = secondsFromMidnight(?D1.time) + julianDayNumber(?D1.date) * 24 * 60 * 60 - (secondsFromMidnight(?D2.time) + julianDayNumber(?D2.date) * 24 * 60 * 60). axiom daysBetweenDateAndTime nonFunctionalProperties dc:description hasValue "the difference in days between two different DateAndTime" endNonFunctionalProperties definedBy daysBetween[instant1 hasValue ?T1, instant2 hasValue T2, result hasValue ?X] <- D1 memberOf dateAndTime and D2 memberOf dateAndTime and ?X = daysBetween(D1.date, D2.date). axiom intervalContainment nonFunctionalProperties dc:description hasValue "computes if a interval ?X contains a second interval ?Y" endNonFunctionalProperties definedBy 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 nonFunctionalProperties dc:description hasValue "computes if a interval ?X contains a instant ?Y" endNonFunctionalProperties definedBy 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).