ontologyhttp://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/dt.wsmlnamespacedefault=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-propertiesdc:title"DateandTimeOntologyontology"dc:creator"DERI International"dc:subject"Date", "Time", "DateandTime Algebra"dc:description"generic representation of dataandtime including basic algebra"dc:publisher"DERI International"dc:contributor"Holger Lausen", "Axel Polleres", "Ruben Lara"dc:date"2004-07-06"dc:typehttp://www.wsmo.org/2004/d2/v0.3/20040329/#ontosdc:format"text/plain"dc:language"en-US"dc:relationhttp://www.isi.edu/~pan/damltime/time-entry.owl, http://www.w3.org/TR/xmlschema-2/dc:coverage"World"dc:rightshttp://www.deri.org/privacy.htmlversion"$Revision: 1.8 $"comment:conceptDefinitionsconceptinstantnon-functional-propertiesdc:description"An instant represents a particular point in time"conceptintervalnon-functional-propertiesdc:description"An interval represents a duration between 2 points in time" startoftypeinstant endoftypeinstantconceptdatenon-functional-propertiesdc:description"conceptdateandits representation according to the Gregorian Calendar"subconceptOfinstant dayOfMonthoftypedayOfMonth monthOfYearoftypemonthOfYear yearoftypeyearconceptdayOfMonthnon-functional-propertiesdc:description"day of a month is represented by an integer"subconceptOfintegerconceptyearnon-functional-propertiesdc:description"year is represented by an integer"subconceptOfintegerconceptmonthOfYearnon-functional-propertiesdc:description"monthOfYear is represented by an integer"subconceptOfintegerconcepttime hourOfDayoftypehourOfDay minuteOfHouroftypeminuteOfHour secondOfMinuteoftypesecondOfMinuteconceptsecondOfMinutenon-functional-propertiesdc:description"a secondOfMinute is represented by an integer"subconceptOfintegerconceptminuteOfHournon-functional-propertiesdc:description"a minuteOfHour is represented by an integer"subconceptOfintegerconcepthourOfDaynon-functional-propertiesdc:description"a hourOfDay is represented by an integer"subconceptOfintegerconceptdateAndTimenon-functional-propertiesdc:description"conceptdateandtimeandrepresenting together a specific point of time (instant)"subconceptOfinstant dateoftypedate timeoftypetimecomment:variableDefintionsvariableX, Y, Z, D1, D2oftypetopConceptvariableA, B, C, D, E, F, JDN, JDN_D1, JDN_D2, SFM_T1, SFM_T2oftypexsd:integervariableT, T1, T2oftypetimevariableJulianDayNumber, Difference, SecondsFromMidnightoftypexsd:integervariableInstant, Instant1, Instant2oftypeinstantcomment:relationDefinitionsrelationinvalidnon-functional-propertiesdc:description"the invalidrelationis one way to encode an integrity constraints, if the extension of thisrelationis non empty theontologyis inconsistent, i.e. the extension contains all invalid resources. Axioms can be used to define the extension e.g. validMonthOfYear"parameteranyObjectoftypetopConceptcomment:functionDefintionsfunctionjulianDayNumbernon-functional-propertiesdc: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 itandany other Julian Day Number"dc:sourcehttp://quasar.as.utexas.edu/BillInfo/JulianDatesG.htmlparameterInstantoftypeinstantnon-functional-propertiesdc:descripion "For each instant there should exist a corresponding Julian Day Number, however it maynotbe always defined only by this binary predicate, e.g. if the instant is represented as Gregorian Dateandit is a date between 1582and1924 a country must be given as thirdparameter(since e.g. Greece changed no earlier then 9th of March 1924 from the Julian to the Gregorian Calendar)"comment:The followingdc:sourceindicates which country changed in which yearcomment:from the Julian to the Gregorian Calendardc:sourcehttp://members.brabant.chello.nl/~h.reints/cal/whenjul2greg.htmrangeJulianDayNumberoftypexsd:integerfunctiondaysBetweennon-functional-propertiesdc:description"(Instant1, Instant2, Difference) is a triple of the ternaryrelationcorresponding to thisfunctioniff Instant1andInstant2 are members of theconcept'instant' (particular point in time)andInstant2 is 'Difference' days after Instant1."parameterinstant1oftypeinstantparameterinstant2oftypeinstantrangeoftypeintegerfunctionsecondsBetweennon-functional-propertiesdc:description"(Instant1, Instant2, Difference) is a triple of the ternaryrelationcorresponding to thisfunctioniff Instant1andInstant2 are members of theconcept'instant' (particular point in time)andInstant2 is 'Differnce' seconds after Instant1."parameterinstant1oftypeinstantparameterinstant2oftypeinstantrangeoftypeintegerfunctionsecondsFromMidnightnon-functional-propertiesdc:description"(Time, SecondsFromMidnight) is a tuple of the binaryrelationcorresponding to thisfunctioniff SecondsFromMidnight are the seconds elapsed from 00:00:00 of the same day. This simplifies the axiomatization of the difference between two given times"parametertimeoftypetimerangeoftypeintegerfunctioncontainsnon-functional-propertiesdc:description"(Interval, X) is a tuple of the binaryrelationcorresponding to thisfunctioniff Interval contains XandX is an instantoran interval"parameterinterval1oftypeintervalrangeoftype(instantorinterval)comment:axiomDefintionsaxiomvalidMonthOfYearnon-functional-propertiesdc:description"integrity constraint for valid monthOfYear"logical-expression"invalid (X) <- XmemberOfmonthOfYearand(X < 1orX > 12)."axiomvalidDayOfMonthnon-functional-propertiesdc:description"integrity constraint for valid dayOfMonths"logical-expression"invalid (X) <- XmemberOfdayOfMonthand(X < 1orX > 31)."axiomvalidDatenon-functional-propertiesdc: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 isnota 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 mathematicalfunctionsymbol 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:sourcehttp://www.tondering.dk/claus/cal/node3.htmllogical-expression"invalid (X) <- XmemberOfdateand(invalid(X.monthOfYear)orinvalid(X.year)or(X.dayOfMonth > 31andX.monthOfYear = 1)or(X.dayOfMonth > 28andX.monthOfYear = 2andnot(modulo(X.year,4) = 0and(modulo(X.year,100) != 0ormodulo(X.year,400) = 0)))or(X.dayOfMonth > 29andX.monthOfYear = 2)or(X.dayOfMonth > 31andX.monthOfYear = 3)or(X.dayOfMonth > 30andX.monthOfYear = 4)or(X.dayOfMonth > 31andX.monthOfYear = 5)or(X.dayOfMonth > 30andX.monthOfYear = 6)or(X.dayOfMonth > 31andX.monthOfYear = 7)or(X.dayOfMonth > 31andX.monthOfYear = 8)or(X.dayOfMonth > 30andX.monthOfYear = 9)or(X.dayOfMonth > 31andX.monthOfYear = 10)or(X.dayOfMonth > 30andX.monthOfYear = 11)or(X.dayOfMonth > 31andX.monthOfYear = 12) )."axiomvalidHourOfDaynon-functional-propertiesdc:description"integrity constraint for valid hourOfDay:"logical-expression"invalid (X) <- XmemberOfhourOfDayand(X < 0orX > 23)."axiomvalidMinuteOfHournon-functional-propertiesdc:description"integrity constraint for valid minuteOfHour:"logical-expression"invalid (X) <- XmemberOfminuteOfHourand(X < 0orX > 59)."axiomvalidSecondOfMinutenon-functional-propertiesdc:description"integrity constraint for valid secondOfMinute:"logical-expression"invalid (X) <- XmemberOfsecondOfMinuteand(X < 0orX > 59)."axiomvalidTimenon-functional-propertiesdc:description"integrity constraint for valid time:"logical-expression"invalid (X) <- XmemberOftimeand(invalid(X.hourOfDay)orinvalid(X.minuteOfHour)orinvalid(X.secondOfMinute))."axiomvalidDateAndTimenon-functional-propertiesdc:description"integrity constraint for valid dateAndTimes:"logical-expression"invalid (X) <- XmemberOfdateAndTimeand(invalid(X.date)orinvalid(X.time))."axiomvalidIntervalnon-functional-propertiesdc:description"computes if a interval X contains a second interval Y"logical-expression"invalid(X) <- XmemberOfintervalandX.start < X.end."axiomequalityDatenon-functional-propertiesdc:description"computes equality of a date"logical-expression"X = Y <- YmemberOfdateandXmemberOfdateandX.dayOfMonth = Y.dayOfMonthandX.monthOfYear = Y.monthOfYearandX.year = Y.year."axiombeforeDatenon-functional-propertiesdc:description"computes if a given date X is before another date Y"logical-expression"X < Y <- YmemberOfdateandXmemberOfdateand((X.dayOfMonth = Y.dayOfMonthandX.monthOfYear = Y.monthOfYearandX.year = Y.year)or(X.monthOfYear < Y.monthOfYearandX.year = Y.year)or(X.year < Y.year))."axiomafterDatenon-functional-propertiesdc:description"defined as inverse of beforeDate"logical-expression"X > Y <- Y < X"axiomjulianDayNumbernon-functional-propertiesdc:description"ThisAxiomdescribes 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 isnotunambiguous since the country should be taken into to account as 3rdparameter(e.g. Greece changed at the 9 Mar 1924 from the Julian to the Gregorian calendar). Details to the axiomatization If the month is JanuaryorFebruary we subtract 1 from the year to get a new Yearandadd 12 to the month to get a new Month. (Thus, we are thinking of JanuaryandFebruary as being the 13thand14th month of the previous yearandMarch 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 thefunctionsymbol 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:sourcehttp://quasar.as.utexas.edu/BillInfo/JulianDatesG.html, http://members.brabant.chello.nl/~h.reints/cal/whenjul2greg.htmlogical-expression"julianDayNumber(X) = JDN <- XmemberOfdateand(( X.monthOfYear < 3andY = X.year -1andM = X.monthOfYear + 12 )or( X.monthOfYear > 2andY = X.yearandM = X.monthOfYear ))andD = X.dayOfMonthandA = floor(Y / 100)andB = floor(A / 4)andC = 2 - A + BandE = floor(365.25 * (Y + 4716))andF = floor(30.6001 * (M + 1))andJDN = C + D + E + F - 1524."axiomdaysBetweenDatesnon-functional-propertiesdc:description"the difference in days between 2 dates"logical-expression"daysBetween(D1, D2) = X <- D1memberOfdateandD2memberOfdateandjulianDayNumber(D1, JDN_D1)andjulianDayNumber(D2, JDN_D2)andX = JDN_D1 - JDN_D2."axiomequalityTimenon-functional-propertiesdc:description"computes if two given times are the same"logical-expression"X = Y <- XmemberOftimeandYmemberOftimeandX.secondOfMinute = Y.secondOfMinuteandX.minuteOfHour = Y.minuteOfHourandX.hourOfDay = Y.hourOfDay."axiombeforeTimenon-functional-propertiesdc:description"computes if a given time X is before another time Y"logical-expression"X < Y <- XmemberOftimeandYmemberOftimeand((X.secondOfMinute < Y.secondOfMinuteandX.minuteOfHour = Y.minuteOfHourandX.hourOfDay = Y.hourOfDay)or(X.minuteOfHour < Y.minuteOfHourandX.hourOfDay = Y.hourOfDay)or(X.hourOfDay < Y.hourOfDay))."axiomafterTimenon-functional-propertiesdc:description"defined as inverse of beforeTime"logical-expression"X > Y <- Y < X."axiomsecondsFromMidnightnon-functional-propertiesdc:description"computes the amount of seconds from midnight"logical-expression"secondsFromMidnight(T, X) <- TmemberOftimeandX = T.secondOfMinute + (T.minuteOfHour*60) + (T.hourOfDay*60*60)."axiomsecondsBetweenTimesnon-functional-propertiesdc:description"the difference in seconds between 2 times"logical-expression"secondsBetween(T1, T2, X) <- T1memberOftimeandT2memberOftimeandsecondsFromMidnight(T1, SFM_T1)andsecondsFromMidnight(T2, SFM_T2)andX = SFM_T1 - SFM_T2."axiomequalityDateAndTimenon-functional-propertiesdc:description"computes if DateandTime are equal"logical-expression"X = Y <- XmemberOfdateAndTimeandYmemberOfdateAndTimeandX.date = Y.dateandX.time = Y.time."axiombeforeDateAndTimenon-functional-propertiesdc:description"computes if a given dateandtime X is before another dateandtime Y"logical-expression"X < Y <- XmemberOfdateAndTimeandYmemberOfdateAndTimeand((X.date = Y.dateandX.time < Y.time)orX.date < Y.date)."axiomafterDateAndTimenon-functional-propertiesdc:description"defined as inverse of beforeDateAndTime"logical-expression"X > Y <- Y < X."axiomsecondsBetweenDateAndTimenon-functional-propertiesdc:description"computes the difference in seconds between two different DateAndTime"logical-expression"secondsBetween(D1, D2, X) <- D1memberOfdateAndTimeandD2memberOfdateAndTimeandjulianDayNumber(D1.date, JDN_D1)andjulianDayNumber(D2.date, JDN_D2)andsecondsFromMidnight(D1.time, SFM_T1)andsecondsFromMidnight(D2.time, SFM_T2)andX = SFM_T1 + JDN_D1 * 24 * 60 * 60 - (SFM_T2 + JDN_D2 * 24 * 60 * 60)."axiomdaysBetweenDateAndTimenon-functional-propertiesdc:description"the difference in days between two different DateAndTime"logical-expression"daysBetween(D1, D2, X) <- D1memberOfdateAndTimeandD2memberOfdateAndTimeanddaysBetween(D1.date, D2.date, X)."axiomintervalContainmentnon-functional-propertiesdc:description"computes if a interval X contains a second interval Y"logical-expression"contains(X, Y) <- XmemberOfintervalandYmemberOfintervaland(X.start < Y.startorX.start = Y.start)and(X.end > Y.endorX.end = Y.end)."axiominstantContainmentnon-functional-propertiesdc:description"computes if a interval X contains a instant Y"logical-expression"contains(X, Y) <- XmemberOfintervalandYmemberOfinstantand(X.start < YorX.start = Y)and(X.end > YorX.end = Y)."