Thank you, Sir, for replying to the post! Sir, when I was reading through the code, I saw that "AdditiveExpression" here ( https://github.com/RDFLib/rdflib/blob/master/rdflib/plugins/sparql/operators.py#L755) dealt with both subtraction and addition of variables in the SPARQL query expression, for instance, a+b, a-b etc. So far, this handled only numeric types of Literals (integer, float, double etc) in the SPARQL query, which were actually converted to python numeric types to perform additions and subtractions and giving result in appropriate datatypes.
Hence, adding these additive and subtractive properties to Date, Time and DateTime raw Literals itself wasn't working because for evaluation in SPARQL query these Literals are converted to python numeric types and since dateTime Literals cannot be converted to numeric type, it ignores such variables. Thus, it looked important to handle the case of DateTime arithmetic in the SPARQL query. The unary operator, in this case, wasn't working because I needed to use minus operator between two variables. As you said, It will be also useful to add these arithmetic operations to raw Literals also. I have done this work for raw Literals also, I'll soon submit a PR for this, before the SPARQL query fix PR 😀 Thank you again, for taking out the time in guiding and helping me, Sir. 😊 Regards, Akash Sharma -- http://github.com/RDFLib --- You received this message because you are subscribed to the Google Groups "rdflib-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to rdflib-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/9a4b1f45-7fe6-40bd-8f55-960f15e7aa28%40googlegroups.com.