On Tue, 2006-10-10 at 20:39 +0100, Benoit Xhenseval wrote: > Dear Joda People, Paul and Julen, > > Thanks for your comments, it is appreciated. > > Steve, thanks for posting announcement to the list. > > Paul, I agree with you, this would be a great addition to the Kit. It is > not explicit on the interface when the last 'holiday' would fall and whether > this may impact a calculation or not. We have several options to consider, > we can elaborate here a bit if you wish: > > Let's think about requirements: > - should the calculation fail and an exception be thrown if the date > calculated is beyond the last holiday?
I don't think that last holiday (or first holiday) is necessarily the right idea. For example a fiscal year calendar which covered the period 2006-09-01 to 2007-08-30 in the USA might be valid for the entire period even though first holiday is the 3rd of September and last is the 4th of July (you get nearly 3 months for free without any explicit values in the table). Same for a calendar Year, just because the last holiday listed is Boxing Day (to use a UK example), doesn't mean the list of holidays is not good for the entire year 1/1 through 12/31. > - May be this could be a setting on the calculator (like > setEnforceHolidayBoundaries(true) or setStrict(true)? So what use case are you thinking of which wouldn't want to let the developer know that applications are asking outside of the valid range for the list of holidays? > - when it comes to combining n Calculators (you are not limited to 1), we > took the easy approach (sorry the XP approach) Don't wory, I'm all for an XP approach, but I think that valid range of a DateCalulator is the next idea to incorporate. > and created a new set of > holidays based on the combined calculators' This works nicely but would not > allow the detection of an issue at date calculation-time (it does not > remember that calculator1 had only 2006 and calculator2 up to 2007). But > that could be added as an extra internal attribute during the combination > (we would keep the lowest denominator but only if a calculator had 'some' > holidays, not if it is empty). Sure an extra internal which provides the complete _narrowest_ range of all combined DateCalculators (that is one calculator might have all Christmases for a very long time, but another might only list the bank holidays for next year, so the combination of the two is just good for next year. Just my $0.02 worth. > > What do you think? HTH, -Paul ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Joda-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/joda-interest
