* try with 12th of the first date's month >>>>d12=date(year(d1), month(d1), 12) >>>>*-- if first date is past 12th, use 12th of the second date >>>>if d12<d1 >>>> d12=date(year(d2), month(d2), 12) >>>>endif >>>>scan for between(d12, d1, d2) >>>> && do stuff here >>>>endscan>>>
BETWEEN(SYS(11,DATE(YEAR(PpBeg),MONTH(PpBeg),12)),SYS(11,PpBeg),SYS(11,PpEnd)) ; >> OR BETWEEN(SYS(11,DATE(YEAR(PpEnd),MONTH(PpEnd),12)),SYS(11,PpBeg),SYS(11,PpEnd))>>
between(date(year(iif(day(d1)<=12, d1, d2)), month(iif(day(d1)<=12, d1, d2)), 12), d1, d2)is an equivalent one-liner I had in mind... which I wouldn't like to see in my code. Just a matter of taste.