Mauricio FernŠŌdez wrote:
> This weighs a ton (reminds me of Java), how about
>  (DayOfMonth(1) & not(DayOfWeek(:sunday))) |    # maybe  .not ?
>  (DayOfMonth(2) & DayOfWeek(:monday) )
> 
> or even
>  (dom(1) & not(dow(:sunday))) | (dom(2) & dow(:monday))

Yes, that's more like what I'm thinking.

> It's pretty easy to implement with the same technique Criteria uses
> (building the AST using Ruby expressions).

The Criteria approach makes me a tiny bit nervous. David Black could
tell you why.

[snippage]

>>Hmm, should we overload && and || for these? Maybe someone already has. 
> 
> && or || can't be overloaded;  & and | work nicely though.

Yes, that's what I meant.  ;)


Hal