The main problem is that the concept of weekday/weekend as Mon-Fri and
Sat-Sun is a 'western' one. There is a significant portion of the world that
uses other measures.

Stephen

----- Original Message -----
From: "Sean Schofield" <[EMAIL PROTECTED]>
> 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]
>


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

Reply via email to