Good point. Adjusting backwards is really specific to my application's needs. I can see other applications want to adjust to next weekday.

----- Original Message -----
I would think that, in general, you would want the ability to adjust dates
either forward or backward for weekends.  I.e. "1st weekday of the month"
or "last weekday of the month".  "15th of the month, adjusted" might go
either way.

Probably two methods, "adjustForwardToWeekday()" and
"adjustBackwardToWeekday", although alternately "nextWeekday" and
"previousWeekday" could work, with
 Date adjustForwardToWeekday(Date d) {
   Date n = d.nextWeekday();
   return n.previousWeekday().equals(d) ? d : n;
 }
etc.
--scott



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to