Steve & Gregory,

Thanks for your suggestions.  I could not find a direct link from the joda website to the contribution stuff so I had a look directly in SVN.  Are these released as jar files as well?

Anyway, went through the calendar stuff and I must admit it is quite comprehensive and Scott Duchin must have spent a lot of time on it, wow. 

However, I believe that it answers a different problem, it is also dependent on Java 5, which I am personally ok with but.. is Joda ok with that?  I am trying to provide some "calculator" classes, they would not (and should not) attempt at defining when the holiday is but use a given set of holidays to calculate some stuff.

Ok, so could I use the existing classes to feed the data in calculators?  May be but I am not keen on the amount of data that is statically loaded (i.e. hardcoded) and, what feels like (but I may be wrong) a requirement to have a holiday belonging to a "name" or type of holiday (like "Christmas" and then a holiday can be added to that class of holidays and I can query it like show me all "Christmasses"... Again I may have it wrong.

What I had in mind is more lightweight and has less dependencies.

The set of holidays is loaded from somewhere, each bank has its own static data validation mechanism and they won't accept anything else/any other source.  May be a HolidayHolder may be useful but again, this should not introduce a dependency on the calculators/calendars....

I'm thinking something along these lines:
public interface BusinessCalendar {
    void setStartDate(final LocalDate startDate);
    LocalDate getStartDate();
    LocalDate getCurrentDate();
    BusinessCalendar plusDays(final int days);
    BusinessCalendar plusBusinessDays(final int days);
    void setNonWorkingDays(Set<LocalDate> holidays);
    Set<LocalDate> getNonWorkingDays();
    void setWorkingWeekDays(WorkingWeek week);
}

The instance would be created by a factory for a given type (forward, backward, etc)...

What do you think?

Do you plan to release these contributions as a separate jar? Are they sub-projects in your build?

Many thanks

Benoit
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to