@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix time: <http://www.w3.org/2000/10/swap/time#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix : <https://example.org/#>.

# person data
:patH :birthDay "1944-08-21"^^xsd:date.

# is the age of a person above some duration?
{ ?S :ageAbove ?A } <= {
    ?S :birthDay ?B.
    "" time:localTime ?D.
    (?D ?B) math:difference ?F.
    ?F math:greaterThan ?A.
}.

# query
{
    ?S :ageAbove "P75Y"^^xsd:duration.
} =^ {
    ?S :ageAbove "P75Y"^^xsd:duration.
}.
