I agree. We have talked about this before, we are looking at incorporating
Joda Time which has constructs (and a great Date/Time API) eventually to
support that sort of declarative temporal rules.

but no idea when we can do this. One aspect/limitation is that we really
don't want an extra *runtime* dependency (as Joda Time can not just be used
at compile time, at least thats my thinking). There is a JSR under way to
make Joda Time part of Java 7 (maybe) which I am supporting, but hopefully
we can do something sooner then that.

If you could suggest some sample drl level syntax that would express what
you need, perhaps we may be able to do this in another way in the meantime
(we already have some limited treatment of dates, no reason why it cant be
extended).

As always, patches are welcome !


Michael.

On 11/23/06, Dirk Bergstrom <[EMAIL PROTECTED]> wrote:

Most of the rules I need to write have a date-based component.  Examples:

  If it is less than seven days before user's birthday...

  If it is more than three hours since user's last meal...

  If it is between four and seven days before user's next appointment...

There doesn't appear to be a way to do this without an eval and some
behind-the-scenes complexity.  Am I missing something?

It would be nice if the syntax natively supported date interval
comparisons.
Since the current time is always changing, any constraint using one of
these
constructions would have to be re-evaluated every time (just like an
eval),
but it would at least be easy to write the rules.

--
Dirk Bergstrom               [EMAIL PROTECTED]
_____________________________________________
Juniper Networks Inc.,          Computer Geek
Tel: 408.745.3182           Fax: 408.745.8905

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to