correct way to use / example of Date helper function in DSL?

103 views
Skip to first unread message

Paul Pfaff

unread,
Aug 25, 2014, 1:38:48 PM8/25/14
to no...@googlegroups.com
Hey group,
again, thanks for being so helpful on my last question, I'm working with the date helper functions listed on the docs (http://c2fo.github.io/nools/)

what's the correct syntax for utilizing the date helper function in the nools DSL? I've tweaked it a few ways and I'm still doing it wrong.


From page: (years|months|days|hours|minutes|seconds)(Ago|FromNow)(interval) - adds/subtracts the date unit from the current time

snippet from my DSL:

rule NewShopper {
    when {
        s : Shopper s.shopperStartDate < (days)(Ago)(150)
    }
    then{
        process.nextTick(function(){
        s.rulesFlagged.push("Shopper younger than 150 Days");
        });
    }
}

Thanks in advance,
Paul
Reply all
Reply to author
Forward
0 new messages