I made an OWL ontology with some xsd:duration datatype. Then I converted it into prolog facts using Thea.
I have the following xsd:duration structure PnYnMnDTnHnMnS. How can I write prolog rules to compare two durations, in order to establish which one is greater?
When I retrieve data from my prolog facts, it has this form:
literal(type('http://www.w3.org/2001/XMLSchema#duration', Value))
I managed to extract Value using:
extractDuration(Literal, Result):-arg(1,Literal,Out1),arg(2,Out1,Result).
Which leads to (for example):
'P5D', 'PT10H', or 'P3DT15H32M'
Still have no idea how to compare them.