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

sttl.calendar.month.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
prefix cal: 
template st:month(?y, ?m) {
format {
    """
    

%s

    Mo Tu We Th Fr Sa Su \n    
    %s    
    %s
    # additional space when last day is sunday (because \n alone fails)
    %s    
    
""" cal:month(?m) group { if (?n = 1, xt:space(?first - 1), "") xt:pretty(?n) #st:call-template(st:date, ?date) " " if (?jour = "Sunday", "\n", "") ; separator = "" } if (?first + ?days - 1 < 35 , "\n ", "") if (?first + ?days - 1 = 35 && ?last = 7, " ", "") } ; separator = "\n" } where { bind (cal:days(?y, ?m) as ?days) bind (cal:num(xt:day(xsd:date(concat(?y, "-", ?m, "-", 1)))) as ?first) bind (cal:num(xt:day(xsd:date(concat(?y, "-", ?m, "-", ?days)))) as ?last) bind (unnest(xt:iota(?days)) as ?n) bind (xsd:date(concat(?y, "-", ?m, "-", ?n)) as ?date) bind (xt:day(?date) as ?jour) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy