On Tue, Feb 23, 2010 at 8:07 AM, djb <span dir="ltr"><<a href="mailto:dbrownell83@hotmail.com">dbrownell83@hotmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I think though that the majority of uses for a rules engine is in a business<br>
context, where they don't use astronomical time.<br>
<br>
If the doctor's orders are:<br>
"You cannot get out of bed for 2 months"<br>
<br>
This means 59 days if he told you February 1st, and it means 62 days if he<br>
told you July 1st.<br>
<br></blockquote><div><br>This is a particularly bad example, because doctors can't say that - at<br>least not one I'd trust ;-)<br><br>I'm arguing that you cannot expect a computer program to relieve you from<br>
the burden of defining what you mean by a "duration of one year" (or month).<br>Some legal rules require a person to have a certain age, and it is (for humans)<br>more convenient to decide this on a person's birthday YMD plus an increment<br>
in the Y number. If your application requires you to use an increment in the year <br>
component of the YMDhms representation of a point in time, then you are<br>
indeed stuck with Calendar and the resulting overhead. (Memoizing<br>
the results of YMDhms +/- n years might speed things up, for the usual<br>
price.)<br><br>But many applications would be satisfied with using a fixed duration for<br>a year in terms of 365 or 365.25 or some such value. If, for instance, you<br>have a library, and you must decide to move a book into deep storage<br>
"if it has not been requested for more than a year" you might calculate<br>this (faster) by adding 356*24*60*60 to the clock value of the last return.<br><br>-W<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
So at least for me, I am going to have to work out a plan that involves<br>
GregorianCalendar.<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://n3.nabble.com/AGE-problem-tp215215p354847.html" target="_blank">http://n3.nabble.com/AGE-problem-tp215215p354847.html</a><br>
Sent from the Drools - User mailing list archive at Nabble.com.<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>