All Downloads are FREE. Search and download functionalities are using the official Maven repository.

query.agenda.rq Maven / Gradle / Ivy

Go to download

Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1 Query and Update.

There is a newer version: 4.6.1
Show newest version
#
# Generate the calendar of the year
# Olivier Corby - Wimmics, Inria, I3S - 2015
#
prefix cal: 
template {
    "\n" cal:month(?m) "\n"
    "Mo Tu We Th Fr Sa Su \n"
    group {
        if (?n = 1, us:space(cal:num(?day) - 1), "")
        if (?n < 10, " ", "") ?n " "
        if (?day = "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 ?date)
    bind (xt:day(?date) as ?day)
}
group by ?m
order by ?m
values ?y { 2015 }

function us:space(?n) { 
   if (?n = 0, "", concat("   " , us:space(?n - 1)))
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy