How to handle/compare time, datetime by using Jinja

Hi,

is there any possibility to handle date and time values in an orquesta workflow?
I want to compare a date and time value from JSON ( 2020-11-13T09:08:34.591Z) to the current time within Jinja.
Some methods to convert it to a datetime object and afterwards check if it is within the last 7 days for example would be helpful.

Maybe like: https://support.sendwithus.com/jinja/jinja_time/

It can be done using YAQL

Dataset
{
date: “2020-11-13T09:08:34.591Z”
}

YAQL query

let(datetime($.date.rightSplit(".",1).first(), "%Y-%m-%dT%H:%M:%S"))->[$.year, $.month, $.day, $.hour, $.minute, $.second]

Result

[
    2020,
    11,
    13,
    9,
    8,
    34
]

How you evaluate the information from there is up to you. (this solution isn’t perfect because the millisecond isn’t supported or the timezone).

Thank you very much this might help. Sometimes I forget to check yaql possibilities as well.
But in general I prefer Jinja as it offers more possibilities to use if clauses, etc.

Would be really nice to find a Jinja solution.