ontologyhttp://www.wsmo.org/2004/d3/d3.2/v0.1/20040628/dt.wsmlnamespacedefault=http://www.wsmo.org/ontologies/dateTime#, dc=http://purl.org/dc/elements/1.1#, wsml=http://www.wsmo.org/2004/d16/d16.1/v0.2/20040418#non-functional-propertiesdc:title"Date and Time 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-06-28"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.12 $"comment:conceptDefinitionsconceptinstantnon-functional-propertiesdc:description"An instant represents a particular point in time and is the superconcept of all concrete representations such as the Gregorian calendar"conceptintervalnon-functional-propertiesdc:description"An interval represents a duration between 2 points in time" startoftypeinstant endoftypeinstantconceptdatenon-functional-propertiesdc:description"concept date and its representation according to the Gregorian Calendar" subconcept-of instant dayOfMonthoftypedayOfMonth monthOfYearoftypemonthOfYear yearoftypeyearconceptdayOfMonthnon-functional-propertiesdc:description"day of a month is represented by an integer" subconcept-of xsd:integerconceptyearnon-functional-propertiesdc:description"year is represented by an integer" subconcept-of xsd:integerconceptmonthOfYearnon-functional-propertiesdc:description"monthOfYear is represented by an integer" subconcept-of xsd:integerconcepttime hourOfDayoftypehourOfDay minuteOfHouroftypeminuteOfHour secondOfMinuteoftypesecondOfMinuteconceptsecondOfMinutenon-functional-propertiesdc:description"a secondOfMinute is represented by an integer" subconcept-of xsd:integerconceptminuteOfHournon-functional-propertiesdc:description"a minuteOfHour is represented by an integer" subconcept-of xsd:integerconcepthourOfDaynon-functional-propertiesdc:description"a hourOfDay is represented by an integer" subconcept-of xsd:integerconceptdateAndTimenon-functional-propertiesdc:description"concept date and time and representing together a specific point of time (instant)" subconcept-of instant dateoftypedate timeoftypetimecomment:variableDefinitionsvariableX, Y, Z, D1, D2memberOftopConceptvariableA, B, C, D, E, F, JDN, JDN_D1, JDN_D2, SFM_T1, SFM_T2memberOfxsd:integervariableT, T1, T2memberOftimecomment: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 it and any 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 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 yearcomment:from the Julian to the Gregorian Calendardc:sourcehttp://members.brabant.chello.nl/~h.reints/cal/whenjul2greg.htmrangeoftypexsd:integerfunctiondaysBetweennon-functional-propertiesdc: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."parameterinstant1oftypeinstantparameterinstant2oftypeinstantrangeoftypexsd:integerfunctionsecondsBetweennon-functional-propertiesdc: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."parameterinstant1oftypeinstantparameterinstant2oftypeinstantrangeoftypexsd:integerfunctionsecondsFromMidnightnon-functional-propertiesdc: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"parametertimeoftypetimerangeoftypexsd:integercomment:relationDefintionsrelationcontainsnon-functional-propertiesdc: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"parameterintervaloftypeintervalparameterintervalOrInstantoftype(instantorinterval)comment:axiomDefinitionsaxiominvalidMonthOfYearnon-functional-propertiesdc:description"integrity constraint for valid monthOfYear"logical-expression"<- XmemberOfmonthOfYearand(X < 1orX > 12)."axiominvalidDayOfMonthnon-functional-propertiesdc:description"integrity constraint for valid dayOfMonths"logical-expression"<- 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 is not a leap year; and 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:sourcehttp://www.tondering.dk/claus/cal/node3.htmllogical-expression"<- XmemberOfdateand( (X.dayOfMonth > 28andX.monthOfYear = 2,not((modulo(X.year ,4) = 0andnotmodulo(X.year ,100) = 0)ormodulo(X.year ,400) = 0))or(X.dayOfMonth > 29 , X.monthOfYear = 2)or(X.dayOfMonth > 30 , X.monthOfYear = 4)or(X.dayOfMonth > 30 , X.monthOfYear = 6)or(X.dayOfMonth > 30 , X.monthOfYear = 9)or(X.dayOfMonth > 30 , X.monthOfYear = 11) )."axiominvalidHourOfDaynon-functional-propertiesdc:description"integrity constraint for valid hourOfDay:"logical-expression"<- XmemberOfhourOfDayand(X < 0orX >= 24)."axiominvalidMinuteOfHournon-functional-propertiesdc:description"integrity constraint for valid minuteOfHour:"logical-expression"<- XmemberOfminuteOfHourand(X < 0orX >= 60)."axiominvalidSecondOfMinutenon-functional-propertiesdc:description"integrity constraint for valid secondOfMinute:"logical-expression"<- XmemberOfsecondOfMinuteand(X < 0orX >= 60)."axiominvalidIntervalnon-functional-propertiesdc:description"computes if a interval X contains a second interval Y"logical-expression"<- 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"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: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)hasvalueX <- D1memberOfdateandD2memberOfdateandX = julianDayNumber(D1) - julianDayNumber(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)hasvalueX <- 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)hasvalueX <- T1memberOftimeandT2memberOftimeandX = secondsFromMidnight(T1) - secondsFromMidnight(T2)."axiomequalityDateAndTimenon-functional-propertiesdc:description"computes if Date and Time are equal"logical-expression"X = Y <- XmemberOfdateAndTimeandYmemberOfdateAndTimeandX.date = Y.dateandX.time = Y.time."axiombeforeDateAndTimenon-functional-propertiesdc:description"computes if a given date and time X is before another date and time 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 <- XmemberOfdateAndTimeandYmemberOfdateAndTimeandY < X."axiomsecondsBetweenDateAndTimenon-functional-propertiesdc:description"computes the difference in seconds between two different DateAndTime"logical-expression"secondsBetween(D1, D2) = X <- D1memberOfdateAndTimeandD2memberOfdateAndTimeandX = secondsFromMidnight(D1.time) + julianDayNumber(D1.date) * 24 * 60 * 60 - (secondsFromMidnight(D2.time) + julianDayNumber(D2.date) * 24 * 60 * 60)."axiomdaysBetweenDateAndTimenon-functional-propertiesdc:description"the difference in days between two different DateAndTime"logical-expression"daysBetween(D1, D2)hasValueX <- D1memberOfdateAndTimeandD2memberOfdateAndTimeandX = daysBetween(D1.date, D2.date)."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)."