Skip to content
  • Carlos Garnacho's avatar
    libtracker-data: Make datetime functions accept other than vars · 0eb9b63f
    Carlos Garnacho authored
    The datetime functions were very specific at only accepting variables
    (backed by a table column), using the :localDate and :localTime
    decomposed fields, specific internally to datetime properties.
    
    So, actually make it able to accept other than variables (we will still
    use the decomposed local time for these), and translate these as a
    primary expression. This makes all these queries work (as opposed
    to just the first):
    
    select year(?date) { ?u nie:contentCreated ?date }
    select year(now()) {}
    select year("2015-07-29T23:00:00Z"^^xsd:dateTime) {}
    select year("2015-07-29"^^xsd:date) {}
    0eb9b63f