sttl.calendar.agenda.rq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-core Show documentation
Show all versions of corese-core Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1
Query and Update.
prefix cal:
template st:agenda {
format {
"""
\n%s\n
Mo Tu We Th Fr Sa Su \n
%s
"""
cal:month(?m)
group {
if (?n = 1, xt:space(cal:num(?jour) - 1), "")
if (?n < 10, " ", "") ?n " "
if (?jour = "Sunday", "\n", "")
; separator = ""
}
}
; separator = "\n"
}
where {
bind (unnest(xt:iota(12)) as ?m)
bind (unnest(xt:iota(cal:days(?y, ?m))) as ?n)
bind (xsd:date(concat(?y, "-", ?m, "-", ?n)) as ?day)
bind (xt:day(?day) as ?jour)
}
group by ?m
order by ?m
values ?y { 2015 }
function xt:space(?n) {
if (?n = 0, "", concat(" " , xt:space(?n - 1)))
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy